Debug a PhoneGap app running in Emulator using WebStorm

cordova, debugging, ios, webstorm

Solution

It is all described here in great detail:

http://www.tricedesigns.com/2013/01/18/my-workflow-for-developing-phonegap-applications/

It is a great article that every phonegap starter should read, as it describes how you can set up your development environment.

I have many options:

- Phonegap simulator

- iOS emulator remote debugger

- remote debugging on the actual device

It won't integrate with webstorm but the debugging tools described above are much more powerful anyway.

Problem

Is there a way to debug the javaScript of a PhoneGap based iOS app within WebStorm while the app is running in the iOS emulator? The problem is that some of the events (like 'deviceready') need to be fired to enter certain code paths that I want to debug.

Original source