要在 windows 下偵錯 cocos h5 跟 mac 不一樣 首先安裝weinre $ npm install -g weinre 啟動weinre $ weinre --boundHost 192.168.3.162 --httpPort 9091 查看remote debug, 開啟這個頁面 http://192.168.3.162:9091/client/ iphone chrome的基本信息 element也可以查看 network 如下 查看console輸出 這樣在手機上要找問題就方便多了 cocos打包h5版本之後, 在輸出的 web-mobile/index.html 檔案新增以下內容 <script src="http://192.168.3.162:9091/target/target-script-min.js"></script> 手機端瀏覽運行 http://192.168.3.162/alnair/build/web-mobile/, 回到console後可以看到 weinre 有連接近來 後台也可以看到對應的連接跟log