您的位置:首页 > 其它

weinre远程调试mobile页面

2013-05-15 23:03 197 查看
移动端页面的调试因为没有像firebug 这样的工具,调试起来比在PC更加麻烦一些。
但是借由weinre, 我们也可以像PC端那样,远程调试webapp。

(以下环境均为windows7)

1) 安装weinre
最新版本的weinre 通过npm进行安装

npm -g install weinre


官方地址:
http://people.apache.org/~pmuellr/weinre/
官方文档:
http://people.apache.org/~pmuellr/weinre/docs/latest/

安装示例:
在E盘新建weinre文件夹
E:\program\mobile\weinre

2) cmd
进入该路径





3) 安装完成后,在 E:\program\mobile\weinre 下会有node_modules 文件夹

4) 启动weinre



5) 在浏览器输入 http://localhost:8080/
显示页面:



点击

debug client user interface:http://localhost:8080/client/#anonymous
6) 在需要远程调试的页面添加weinre脚本

<script src="http://localhost:8080/target/target-script-min.js#anonymous"></script>


6) 显示debug页面
http://localhost:8080/client/#anonymous



即可进行调试了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: