2010/05/30

Debugging web pages in Android

Finally I've found a nicer way to debug errors with web pages in the Nexus One!

The Android documentation states that console.log calls can be used to send messages to "logcat", and then you need another app or keep the phone connected to the computer with the SDK and whatever in order to read those messages. Too complex.

On the other hand, if you type "about:debug" in the url bar and press go, you won't notice anything special, but if you press the menu button and then "More", you'll notice that there are two extra items at the end, also there are additional settings at the end of the panel (allowing to change the User-Agent for example). And one of them (enabled by default) is to show the javascript console, so now when a page outputs something to the Javascript console you get a little notification bar at the top and clicking it shows the messages without the need to switch to another application.

I don't know where this feature is described and other about: pages that have special meaning in Android.

1 comment:

Mic said...

Thanks for this information, you saved my day!