使用weinre调试移动端浏览器

352 阅读1分钟
  1. 安装 sudo npm -g install weinre

  2. 输入命令,启动服务: weinre --httpPort 8081 --boundHost -all-

  3. 打开 192.168.0.103:8081 (换成自己的ip) 就可看到页面,点击以下链接:

  4. target为绿色说明连接成功:

  5. 拷贝script到要调试的html页面上,然后启动要调试的项目:

  6. 在手机上访问要调试的页面,然后就可以在 192.168.0.103:8081的 console面板看到log了。

参考:

people.apache.org/~pmuellr/we…