Before debugging has been using the remote debugging chrome, although the effect is very good, but in debugging Cordova, there are many inconvenience.
Found this when looking for a tool on Git: weinre, easy to use
Attach git address : https://github.com/apache/cordova-weinre
Nonsense not to say, to begin directly:
First step: Install
Command: NPM install-g weinre
If the installation fails, try adding the version number: npm-g install [email protected]
Step Two: Run
Command: Weinre-boundhost 192.168.1.108-httpport 8080
My computer's local area network IP is 192.168.1.108
Parameter description:
| Httpport |
Debug Server Port |
| Boundhost |
The IP address or domain name of the server |
Step Three: Use
Address entered in Google Chrome: http://192.168.1.108:8080
As follows:
Add a JS reference to the debug server:
<script src= "Http://192.168.1.108:8080/target/target-script-min.js#anonymous" ></script>
now on the phone to access the page that needs debugging, My Debug page address is: http://192.168.1.108:37365/
So how to debug it?
Open Google Chrome and enter:
http://192.168.1.108:8080/client/#anonymous
You will see the following page when you open it:
is not very familiar with the interface of the interest.
Reference Blog: http://www.cnblogs.com/tugenhua0707/p/4681482.html
------------------------------End Line----------------------------------------------------------------
Discover a mobile web-side remote debugging tool weinre, haha!