您的位置:首页 > 移动开发

使用weinre调试移动端访问的页面

2014-03-12 21:20 253 查看
一、安装

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结构、网络请求等。效果如下。

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