DEV Community

Codewithrandom Blogs
Codewithrandom Blogs

Posted on

Console in Android Mobile Browser Using Eruda? How to Use Eruda?

Hello Coder! Welcome to the Codewithrandom blog, In this article, we learn how to access the Javascript console in our Chrome Browser by typing a simple command. Basically, We use Eruda ,Eruda is a Console for Android Mobile Browsers. So here is the code so you copy-paste in your URL tab in the Mobile browser.

javascript:(function () { var script = document.createElement('script'); script.src="//cdn.jsdelivr.net/npm/eruda";
document.body.appendChild(script); script.onload = function () { eruda.init() } })();
Enter fullscreen mode Exit fullscreen mode

Copy this code and open your mobile browser then paste this, and the browser removes javascript: word from this line so type javascript: manually and click on search or enter, then you see an icon like in the below image.

When you click on this icon you see the same console as we see in our pc or laptop browser so click on the icon that appears in the corner, below the image.

After clicking on this icon you can run any javascript comments or do calculations as we do in-browser so I just write 10+90 and click on executed and the answer is 100 and show output like desktop browsers.

If you want to know more about Eruda check the GitHub repository and read about how code execution and Developer console run in Mobile Browsers!

if you have any confusion to run the Developer console do comment so I reply as soon as possible.

Thank you for reading!

written by @codewith_random

Top comments (2)

Collapse
 
growkon21 profile image
Growkon

This is such an insightful post! I really appreciate how you broke down the topic in a way that's easy to understand. Looking forward to implementing some of these tips in my daily routine!
IB schools in Hyderabad

Collapse
 
mahdi_alkafaji_b3b0410b1f profile image
Mahdi Alkafaji

it says js can't be used like that