In mobile web applications, since there are no debugging tools similar to chrome and firebug, debugging is more difficult than debugging on PCs. Sometimes, you can only modify and compare them repeatedly, however, with weinre, we can easily implement remote debugging.
What is weinre?
Official explanation: we refers to web, in refers to inspector, re refers to remote, and weinre together.
Http://people.apache.org /~ Pmuellr/weinre/
How to install?
Based on node, weinre can be quickly installed using npm:
Npm install weinre
Use
Run the "weinre -- boundHost-all-" command to start the instance. Open a local browser to access http: // localhost: 8081
Add the following mark on the page to be debugged
<Script src = "http: // localhost: 8080/target/target-script-min.js # anonymous"> </script>
The debug page is displayed. You can debug http: // localhost: 8080/client/# anonymous.