How to Debug Phonegap Applications With Safari's Remote Debugger

1. On your iPhone/iPad: Enable Web Inspector . Open “Settings” → “Safari” → “Advanced”. 2. On your desktop/laptop: Enable Developer tools in Safari. Open “Preferences” → “Advanced” check “Show Develop menu in menu bar”. 3. Connect your iPhone via USB to your desktop/laptop. 4. Start the application on your iPad/iPhone via XCode. 5. On your desktop/laptop: Open the Safari Web Inspect debugger. Go to “Preferences” → “Your phone” → “index.html”. You can automate the last step by [using applescript to open Safari's Web Inspector](http://snippets.aktagon.com/snippets/715-how-to-open-safari-s-web-inspector-with-applescript-to-debug-phonegap-app). Note: Use CMD+R to reload index.html.