二. Weinre 調試 IOS Hybrid APP

1. 安裝weinrehtml

npm install –g weinrenpm

2. 打開app

weinre -httpPort 8080 -boundHost -all-spa

 

httpPort 監聽端口代理

boundHost 綁定主機調試

eg.orm

weinre -httpPort 8080 -boundHost 172.16.144.11server

 

成功後會出現相應信息(不要關掉cmd)htm

c:\Users\xxxxx>weinre -httpPort 8080 -boundHost 172.16.144.11
2014-12-11T03:34:11.827Z weinre: starting server at http://172.16.144.11:8080
blog

 

3.Chrome 訪問 http://172.16.144.11:8080 不出意外的話能夠看到weinre的基本信息。

4.把 target script 加入到要調試的appindex.html頁面中。(能夠用iTools導出要調試的app的html頁面修改後再導入)

<script src="http://172.16.144.11:8080/target/target-script-min.js#anonymous"></script>

5.Chrome 訪問http://172.16.144.11:8080/client/#anonymous 就能夠調試頁面了。(可能會慢一點,須要等一下子)

6.手機端app 要設置代理到本機。本機打開Fiddle

相關文章
相關標籤/搜索