npm -g install weinre
weinre [options]
//The server will run until you kill it. Control-C will do the job.
Options available are:
--help (or -? or -h)
Display this help.
--httpPort [portNumber]
--boundHost [hostname | ip address
--verbose [true | false]
--debug [true | false]
启动示例:weinre --boundHost 192.168.1.100 --httpPort 8081
成功访问http://192.168.1.100:8081/ ,表示服务端启动成功。三、使用:
1、在调试页面添加
<script src="http://192.168.1.100:8081/target/target-script-min.js#anonymous"></script>
2、用移动端浏览器访问要调试的页面.
3、用chrome访问http://192.168.1.100:8081/client/
而后可如chrome在pc上调试页面一样,看到页面的dom结构、网络请求等。效果如下。