How to make WebStorm work with Phonegap?

First off, I realize there was already a discussion on this here: http://devnet.jetbrains.com/thread/440967, but it's almost 2 years old, and the answer didn't quite explain enough for me (I'm dumb).

Anyway, what I'm basically trying to accomplish is to be able to write and debug a mobile web app in Webstorm using the chrome phonegap emulator plugin, and then push to a repository and use phonegap build when I'm all set.  The discussion I linked suggests unpacking your files under the project root and creating a new javascript library, however I'm not completely sure which files I should be using.  So far I've created a phonegap project and added the iOS platform.  Am I supposed to use the files from that?  Do I use all of them (I'm assuming not because there are C files in there)?

Thanks and apologies for the ignorance!
Bebhead

5 comments

Thanks, I checked out the first link and unfortunately it had the same problem with the discussion I linked; I understand that I need to place some phonegap js source files into my project somewhere and then reference that as an external library...  But what I don't understand is what parts do I need to copy over and which ones should I not?  And am I even looking in the right place for those parts?  I installed phonegap with node and created a project so I'm assuming any files I want will be in the directory it made for that project (I'm only concerned with iOS right now).  But I'm assuming it would be a mistake to just try to use my whole phonegap project folder as a library in webstorm.
As for the second link I'll have to take a look at that later - firewall thinks it's a porn site, probably because of the .ru ;\.


Thanks for the reply!

0

Is it possible to debug Phonegap code from WS/PS?

TIA

greg

0

I think the Ripple Emulator: http://emulate.phonegap.com/ might be what you're looking for...  You can just debug in Chrome like normal, but with the Ripple Emulator plug-in.  A couple things to note about it though, it only seems to support phonegap 2.* currently (not the latest 3.*), and it doesn't seem to play nicely with require.js from what I can tell (I believe this is a known problem https://github.com/jrburke/requirejs/issues/876 not specifically related to the emulator necessarily).

0

I was thinking about a remote debug from a virtual or real device. I've tested Ripple, it's handy but it's not the same.

0

Please sign in to leave a comment.