很有用的mobile web application远程调试工具 weinre

时间:2023-03-09 02:39:08
很有用的mobile web application远程调试工具 weinre

在移动web应用中,因为没有类似chrome和firebug的调试工具,调试起来比在PC上相对麻烦一些,有时候仅仅能重复进行改动比对,但使用weinre我们能够轻松做到远程调试的功能。

什么是weinre?

官方解释: we是指web,in是指inspector。re是指remote。合起来就是weinre。

http://people.apache.org/~pmuellr/weinre/

怎样安装?

weinre基于node,使用npm高速安装:

npm install weinre

使用

使用命令 “weinre --boundHost -all-” 进行启动。 打开本地浏览器訪问 http://localhost:8081

很有用的mobile web application远程调试工具 weinre

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbG1lbmdsb3Zl/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="">

在须要调试的页面增加以下标记

<script src="http://localhost:8080/target/target-script-min.js#anonymous"></script>
显示debug页面,就可以调试

很有用的mobile web application远程调试工具 weinre