Phone GapFor the most part when working with PhoneGap, debugging is as simple as loading your project’s www directory in your browser/simulator.  But sometimes you need to debug the PhoneGap API calls.  Well, it turns out you can… sort of.

PhoneGap has a built-in console redirect so that when you make a

console.log();

call it outputs to Xcode’s Console.  To view the Console within Xcode click View → Console.  You don’t even need to do anything special – just Build and Run.

I say sort of because you can’t set breakpoints or the like within your JS.  But console output beats the hell outta alerts.