通过 weinre 调试移动端代码
1、通过node.js安装weinre
npm -g install weinre
2、打开node.js,启动
weinre -httpPort 8081 -boundHost -all-
3、在浏览器打开localhost:8081,看到如下的效果
4、在页面加入如下代码:
<script src="http://你的ip地址:8081/target/target-script-min.js#anonymous"></script>
5、打开iis发布的路径,比如我的项目发布的端口是50001,则在移动端打开:
http://你的ip地址:50001/打开的文件名.html
Ps:PC端开热点,让移动端连接,使得移动端和和PC处于同个网段