iOS phonegap application running on simulator but not in a device. How to debug


I just finished developing a Cordova / Phonegapp app. When I test it on iOS simulator it all works fine and quick, but, when testing on device it works only part of it.

My app is a game with the kingdom background and has 8 buttons (8 buildings).

When I click on each building it leads me to a screen representing what it's inside the building, but one of them doesn't work and gets my app frozen.

How can I see fail or crash reports that helps me debug my app on device?

If you provide full path to your file i.e. "file:///Users/.../someDir/some.html" it will work only on simulator running on the same machine where your project is.

I suggest just adding the additional path to the file you want to access i.e. if you are in "/someDir" you will need to provide only "some.html" or if you want to access parent directory just use "../".

As far as debugging Cordova app, I suggest downloading this plugin and using console.log instead of alert.

Hope this helped.