The Secret JavaScript Console and Debugger in the Default Android Browser

The official Android browser is a mess. It doesn’t even have a name. It’s no wonder that Google plans to replace it with Chrome.

There’s a lot of  browser UI that looks gorgeous in Safari Mobile for iOS. But when try to see it through an Android browser, it often doesn’t even work. The problem is frequently a JavaScript issue, but there’s no documentation indicating how to determine if this is the case. You might be throwing a JS error on line 1 and you’d never know it.

Well, there’s a debugger built in to the default Android browser. In order to access it, you need to put a special instruction in the address bar, “about:debug” (you’ll receive no indication that anything happened).

Once you do this, you should notice two differences: 1) pressing the “Menu” button reveals a few new options at the end of the menu list 2) the settings panel has a bevy of new options available, a section called “Debug.”

We’re looking for one of the items in the new “Debug” section of the default Android browser’s settings: “JavaScript Console.”

The JavaScript console will show you if your JS is erring out, where it’s doing so, and also allow you to write a little debug code.

One thought on “The Secret JavaScript Console and Debugger in the Default Android Browser

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.