How to Debug Phonegap Applications With Safari's Remote Debugger
- On your iPhone/iPad: Enable Web Inspector . Open “Settings” → “Safari” → “Advanced”.
- On your desktop/laptop: Enable Developer tools in Safari. Open “Preferences” → “Advanced” check “Show Develop menu in menu bar”.
- Connect your iPhone via USB to your desktop/laptop.
- Start the application on your iPad/iPhone via XCode.
- 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.
Note: Use CMD+R to reload index.html.