Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phonegap - Javascript debugging in Xcode

I am working on a phonegap based project. I'd like to use some debug tools, to be able to debug some variables etc into XCode console, etc. Now, I've found, that in order to do this, I need to call function console.log.

The problem is, however, when running the application in simulator no debug info is displayed in XCode console... I am using phonegap version 0.9.3, what am I doing wrong?

Thanks for an answer

like image 493
Lukas1 Avatar asked Jan 28 '11 10:01

Lukas1


1 Answers

This feature was completed very recently (two days ago), and is not included in the 0.9.3 release. You can see this ticket in the issue tracker for more information.

To get this working, you have to pull the latest code from the PhoneGap GitHub repository. From a shell:

$ git clone git://github.com/phonegap/phonegap-iphone.git

... and then go about building up the source from scratch. You should see it then!

Alternatively, you replace your console.log statements with debug.log, and that will work in 0.9.3.

like image 67
fil maj Avatar answered Sep 17 '22 22:09

fil maj