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:
- Go to the Settings app on your iOS device and navigate to Safari –> Advanced, and toggle on the Web Inspector switch.
- 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
If HTML, CSS, and JavaScript Are Client-Side, Why Are They Components of a PHP File
How to Add a CSS Class to a Raphael Object
Animationend Event Not Firing on :After Element
Expand/Collapse Mobile Navbar Without JavaScript
Pause/Resume CSS Animations When Switching Tabs
Why Do Arabic Characters Behave as Separate Characters When Styling Single Arabic Character
Why Blocking Event Loop Does Not Block CSS Animation
How to Make the Whole Card Component Clickable in Material UI Using React Js
Why Do Developers Append a Query String in JavaScript Files' Stylesheet Links
How to Change the Default Loading Tile Color in Leafletjs
Scale the Contents of a Div by a Percentage
Using Environment Variables/Parameterizing Config.Xml
How to Monitor Requests on Wkwebview
Send a Notification from JavaScript in Uiwebview to Objectivec
How to Set a Single Value of Transform While Leaving the Other Values