window下调试ios Safari

如何用window在线调试Safari

环境说明: window、chrome

安装 iTunes

Windows 首先要安装 iTunes , 下载安装传送门 iTunes

iPhone开启调试模式

打开 设置 > Safari > 高级> Web检查 > 启用。

安装scoop

使用了PowerShell在你当前Windows的账户下(打开CMD, 不是Cmer)

set-executionpolicy remotesigned -s cu

下载scoop

iex (new-object net.webclient).downloadstring('https://get.scoop.sh')

安装ios-webkit-debug-proxy

scoop bucket add extras
scoop install ios-webkit-debug-proxy

如图, 允许

6759456-7e6449960b8835d4.png

开始调试

浏览器输入

http://localhost:9221/

显示如下


6759456-90aa3df5a22d1592.png

手机浏览器输入需要调试的地址然后

**Note:** Your browser may block<sup>[1,](https://code.google.com/p/chromium/issues/detail?id=87815)[2](https://codereview.chromium.org/12621008#msg11)</sup> the above links with JavaScript console error:
<tt style="color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">  Not allowed to load local resource: chrome-devtools://...</tt>
To open a link: right-click on the link (control-click on Mac), 'Copy Link Address', and paste it into address bar.

鼠标放到地址上面然后把它复制出来, 复制出来的长这样

chrome-devtools://devtools/bundled/inspector.html?ws=localhost:9222/devtools/page/1

执行后就可以开始远程调试了。

Tips:
下次调试

ios_webkit_debug_proxy -f chrome-devtools://devtools/bundled/inspector.html

相关参考链接:
https://scoop.sh/
https://github.com/google/ios-webkit-debug-proxy
https://www.jianshu.com/p/bb0ba62b519c

猜你喜欢

转载自blog.csdn.net/weixin_34128534/article/details/87520076