DEV Community

Cover image for Developer console in phone? Chrome APP tricks
Shuvo
Shuvo

Posted on

Developer console in phone? Chrome APP tricks

Sometimes while surfing through a site on your smartphone you might have wanted to know how the codes for the site looks like. But you never saw it because you didn't wanted to get up and turn on the Computer.
But what if I told you can view source code of any website right on your smartphone using the Chrome APP.

In this article we are going to see some useful Chrome APP tricks that every developers should know.

1. View Source Code:

To get the source code of any website from your Chrome browser App all you have to do is add view-source: in front of the URL.
View page source code in android phone

2. Run JavaScript through address bar:

In the address bar of your Chrome app you can run JavaScript Also. The syntax is javascript:your_code
Run JavaScript through address bar

3. Developer console on smartphone:

You can use eruda to access desktop like developer console from your smartphone.
Just go the website you're developing. Then type javascript:(function () { var script = document.createElement('script'); script.src="//cdn.jsdelivr.net/npm/eruda"; document.body.appendChild(script); script.onload = function () { eruda.init() } })(); and hit enter. And you'll be able to acces desktop like developer console from you browser.

PS. if you just copy past it, chrome will remove javascript: from the beginning so you have to type it back manually.

Developer console on smartphone

Got a trick? Share it in the comments.

Make sure you checkout my other articles and YouTube channel


Was it helpful? Support me on Patreon

Patreon Logo

Top comments (1)

Collapse
 
suhakim profile image
sadiul hakim

hey nice programmer .I sea you in a facebook group.would you kindly suggest me any resource from where i can learn canvas and make games like you.