Appendix A

Debugging Client-side JavaScript

One of my friends once told me that “debugging JavaScript code in Android is like chopping wood with a spoon.” The Android browser doesn’t have any sort of debugger by default. There’s no way to follow the typical debugging scenario: place a breakpoint, add some watches, and then proceed in “step-by-step” mode until you find the problem in the code. So the only thing that you have is console.log—writing some values to the device’s log and reading it afterwards. Still, there are several tools and tips that will hopefully make your debugging experience, if not enjoyable, then at least somewhat easier.

This appendix is devoted to those debugging tools. Debugging is the most important part of the development ...

Get Pro Android Web Game Apps: Using HTML5, CSS3 and JavaScript now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.