weinre调试移动端页面
1. 安裝
npm install -g weinre
2. 啟動
weinre --httpPort 8080 --boundHost -all-
也可以新建 ~(win: c:/user/youname)/.weinre/server.properties 內容為
boundHost: -all-
httpPort: 9090
reuseAddr: true
readTimeout: 1
deathTimeout: 5
這樣以后直接輸入 weinre 就行了
3. 在頁面(例如:index.html)中加入
<script src="http://IP或域名:9090/target/target-script-min.js#lottery"></script>
4. 啟動項目(運行項目中的tomcat等服務器)
5. 通過手機訪問頁面(例如:index.html)
6. 在桌面瀏覽器打開http:// IP 或 域名:9090/client/#lottery
可以調試了
?
如果覺得本地配置麻煩, 可以在http://debug.phonegap.com/配置一個自定義名稱(如:codertonny), 然后在頁面加入
<script src="http://debug.phonegap.com/target/target-script-min.js#codertang"></script>
當手機訪問頁面時, 在桌面瀏覽器打開http://debug.phonegap.com/client/#codertang, 就可以調試了
?
weinre主頁http://people.apache.org/~pmuellr/weinre/docs/latest/
參考:?http://thx.github.io/mobile/debugging-in-mobile/
http://js8.in/2013/11/20/%E4%BA%94%E4%B8%AA%E4%BD%A0%E5%BF%85%E9%A1%BB%E7%9F%A5%E9%81%93%E7%9A%84javascript%E5%92%8Cweb-debug%E6%8A%80%E6%9C%AF/
轉載于:https://www.cnblogs.com/ykt8465279130/p/3497483.html
總結
以上是生活随笔為你收集整理的weinre调试移动端页面的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Oracle数据库空间管理
- 下一篇: 告别2013,迎接2014