-
Notifications
You must be signed in to change notification settings - Fork 13
debugging
Web Inspector all the way!
There are two popular techniques used to debug an application.
When you compile the application yourself, you can use Safari's Remote Web Inspector. Unfortunately, this will not work with the PhoneGap Developer App or PhoneGap Build, although we are investigating options to add this!
You can follow Holly Schinsky's Development Workflow video to learn how to setup and use Remote Web Inspector.
The good ol'fallback in a node library called Weinre. It's a limited implementation of Remote Web Inspector that will work on any browser... not just Webkit.
-
Install Weinre:
$ sudo npm install -g weinre
-
Run Weinre:
$ weinre --boundHost x.x.x.x # replace x.x.x.x with your ip address
-
Add the following script to
www/index.html
:<script src="http://x.x.x.x:8080/target/target-script-min.js#anonymous"></script> # replace x.x.x.x with your ip address
-
Serve and pair the app with the PhoneGap Developer App.
-
Open your browser to http://x.x.x.x:8080/client/#anonymous where
x.x.x.x
is your ip address -
Start debugging!