How to See the JavaScript Errors of Phonegap App in Xcode

How to view javascript errors in ios simulator launced by phonegap?

You have to use Safari Remote Debugging with Web Inspector. See in the relating cordova docs how to do that!

How to view javascript errors in ios simulator launced by phonegap?

You have to use Safari Remote Debugging with Web Inspector. See in the relating cordova docs how to do that!

Phonegap - Javascript debugging in Xcode

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.

How do I debug PhoneGap Javascipt App on ios?

I found the solution to this question. Works for me. So if you want to be able to truly see all the errors triggered by a physical device, you do need access to a physical phone and a mac.I had to borrow an actual iphone and a mac for this.

Following the steps here helped me debug the app.

Phonegap app crash on ios - where can I find a log?

You can make use of remote debugger if you have a Mac and xcode with you. The Remote debugger sits in Safari browser. To enable it follow the below steps:

  1. Go to the Settings app on your iOS device and navigate to Safari –> Advanced, and toggle on the Web Inspector switch.
  2. Now open your desktop Safari and access Safari –> Preferences menu, select the Advanced tab, and ensure that "Show Develop menu in menu bar" check box is enabled.

Now, run your IOS app on xcode. Once making sure that it was running successfully, go ahead and open your Safari Browser and select Develop in the Menu and you can see that your Iphone name being displayed in it. If you hover over it, you can get access your template for debugging. From this web inspector you can make changes to your Javascript or CSS files. You can get to know all the errors and warnings in the App by accessing different parts of the Inspector.

console.log not working in an iOS PhoneGap 3.0 app

You need the debug console plugin added to your project:

phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git

In later versions of phonegap/cordova, to add the debug console plugin in your project:

cordova plugin add org.apache.cordova.console

See Phonegap's console log in iOS devices

For web development on mobile I use Weinre for debugging. It redirects console.log to a remote debugging window, and should work with Phonegap.

console.log is not working in iOS Phonegap App even after adding the console plugin

I have solved this issue by doing these steps

Step 1 :

I Just copy a directory from another cordova project where console.log was working

sudo cp -r DIFF_CORDOVA_PROJECT_PATH/platforms/ios/www/plugins/org.apache.cordova.console CURRENT_CORDOVA_PROJECT_PATH/platforms/ios/www/plugins/

Step 2 :

Add the Code in CURRENT_CORDOVA_PROJECT_PATH/platforms/ios/www/cordova_plugins.js file under module.exports JSON array

{
"file": "plugins/org.apache.cordova.console/www/console-via-logger.js",
"id": "org.apache.cordova.console.console",
"clobbers": [
"console"
]
},
{
"file": "plugins/org.apache.cordova.console/www/logger.js",
"id": "org.apache.cordova.console.logger",
"clobbers": [
"cordova.logger"
]
}

Step 3 :

Adding Meta data on the same cordova_plugins.js file in module.exports.metadata JSON Array :-

"org.apache.cordova.console": "0.2.7"



Related Topics



Leave a reply



Submit