Debugging

PhoneGap is an embedded webview, and both Android and iOS provide tools for debugging web applications running on mobile devices. These tools allow you to inspect HTML and CSS, as well as run and debug Javascript code.

Safari Web Inspector

Steps:

  1. Connect your iOS device to your computer
  2. Launch Safari
  3. Launch your PhoneGap application on your iOS Device
  4. Open Safari's Develop menu, and you should see your iOS Device listed.
  5. Select your PhoneGap Webview listed under your device.

More info can be found on the Apple Developer Website.

Chrome Developer Tools

  1. Ensure Developer Options are enabled on your Android test device.
  2. Launch Google Chrome Web Browser.
  3. Navigate to chrome://inspect in Chrome.
  4. Select your PhoneGap Application running on your device, and the Developer tools will launch.

Visual Studio Debug Tools

See the Microsoft Blog Post.

Crashes and Native Exceptions

If your PhoneGap application is crashing or freezing, or if the Javascript Console shows no errors, you may need to use the Native SDKs in order to debug your application:

iOS

Android

  • Download and install the Android SDK. Attach your device to your computer, and run adb logcat to view your device logs and watch for Exceptions.

Windows Phone

Edit this page on GitHub