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.
- iOS: Safari Web Inspector
- Android: Chrome Developer Tools
- Windows Phone: Visual Studio Web Debugging Tools
- Weinre Remote Debugger
- Debugging Crashes and Native Exceptions
Safari Web Inspector
Steps:
- Connect your iOS device to your computer
- Launch Safari
- Launch your PhoneGap application on your iOS Device
- Open Safari's Develop menu, and you should see your iOS Device listed.
- Select your PhoneGap Webview listed under your device.
More info can be found on the Apple Developer Website.
Chrome Developer Tools
- Ensure Developer Options are enabled on your Android test device.
- Launch Google Chrome Web Browser.
- Navigate to chrome://inspect in Chrome.
- Select your PhoneGap Application running on your device, and the Developer tools will launch.
Visual Studio Debug Tools
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
- Debugging Deployed iOS Apps
- There may also be third party applications which allow you to view your iOS Device Console.
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.