Shawn Wildermuth

Author, Teacher, and Filmmaker
.NET Foundation Board Member

Stories

Tagged with PhoneGap


Debugging PhoneGap with the Android Console

facepalm4If you build PhoneGap apps and test with the browser, moving to phones sometimes causes a boatload of problems. Because there isn't a great debugging story, being able to see the console window would be of great help.

My particular problem was that my JavaScript and CSS links weren't cased correctly. And it seems that the Android implementation is case sensitive (like most Linux implementations) but I couldn't even see what was wrong. Unfortunately the PhoneGap Build tools let's you use the console and interrogate the DOM but console log messages are lost. So I simply dropped down to the Android SDK.

I don't use the Android SDK for development of my PhoneGap apps. I have it installed because I did some early investigation into Android back about two years ago and it was still there. One great thing to say about Eclipse and the Android SDK is that they are simply file-based so when I pave, it still works (still on that drive taking up space). For me this was a lucky break as I needed it to access the console. So how does it work?

Read...