导航栏: 首页 评论列表

远程调试- 万能篇(Weinre)

默认分类 2014/10/23 02:01

1.安装

npm install -g weinre

2.启动 debug server

weinre --httpPort 8080 --boundHost -all-

3.打开http://localhost:8080/ ,复制下面代码

javascript:(function(e){e.setAttribute("src","http://localhost:8080/target/target-script-min.js#anonymous");document.getElementsByTagName("body")[0].appendChild(e);})(document.createElement("script"));void(0);

4.CHrome浏览器中打开要调试的页面,如:http://localhost:8080/demo/weinre-demo.html,在console中运行上面的脚本,然后点击 http://localhost:8080/中的http://localhost:8080/client/#anonymous,看下要调试的页面地址是不是在里面?点它变绿,再点顶上的elements就可以了。


>> 留言评论