thomallen
thomallen

Reputation: 2034

How do I continuously build and debug a PhoneGap/Cordova app?

What is the most efficient way to develop and continuously deploy to the simulator while receiving debug info from console.log etc? For example, is there a way to see the console.log output without manually deploying the build using xCode? Is there any way to see the log output outside of xCode?

Also what is the best way to continuously deploy the app to the simulator? Is there a way to make Cordova rebuild every time I save a file? Would that be a bad idea to try and do? This may just be me having a hard time making the transition from web development to (pseudo) app development.

Upvotes: 0

Views: 351

Answers (1)

Rocklan
Rocklan

Reputation: 8130

Have you read this page? https://github.com/phonegap/phonegap/wiki/Debugging-in-PhoneGap

Your best bet is to develop the app using a browser on your computer. Periodically deploy the app to the simulator to make sure that things are still working as intended. Continuously deploying the app to the simulator is pretty slow, so yes I would think that it's a bad idea. Refreshing the browser is lightning fast, so you want to be doing that as much as possible.

I've found that whenever I develop a new bit of code that does something different that I haven't tested before on the simulator (maybe a fancy CSS transition), I'll write a test page and test it on the simulator, and then probably test it on the phone as well. If it works ok I'll continue development on my machine.

Upvotes: 1

Related Questions