windows使用chrome调试ios webView

包含safari和App
如果安装失败,直接删除C:\Users\Administrator\scoop 重新安装即可

安装scoop

windows下的安装源搜索工具,有点类似centos下的yum、ubuntu下的apt

PowerShell下执行一下命令:

Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')

或者简化命令

iwr -useb get.scoop.sh | iex

失败的话,删除之前安装的重新多安装几次即可。

安装成功后如图所示:

PS C:\Users\Administrator> Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
Initializing...
Downloading scoop...
Extracting...
Creating shim...
Downloading main bucket...
Extracting...
Adding ~\scoop\shims to your path.
'lastupdate' has been set to '2021-05-07T14:03:27.4187897+08:00'
Scoop was installed successfully!
Type 'scoop help' for instructions.

 

 

 

安装 iOS WebKit Debug Proxy
ios_webkit_debug_proxy又名iwdp,通过websocket连接代理来自usbmuxd守护程序的请求,从而允许开发人员在真实和模拟的iOS设备上将命令发送到MobileSafari和UIWebViews。

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

PS C:\Users\Administrator> scoop bucket add extras
Checking repo... ok
The extras bucket was added successfully.

PS C:\Users\Administrator> scoop install ios-webkit-debug-proxy
Installing 'ios-webkit-debug-proxy' (1.8.8) [64bit]
ios-webkit-debug-proxy-1.8.8-win64-bin.zip (3.5 MB) [===============] 100%
Checking hash of ios-webkit-debug-proxy-1.8.8-win64-bin.zip ... ok.
Extracting ios-webkit-debug-proxy-1.8.8-win64-bin.zip ... done.
Linking ~\scoop\apps\ios-webkit-debug-proxy\current => ~\scoop\apps\ios-webkit-debug-proxy\1.8.8
Creating shim for 'ios_webkit_debug_proxy'.
'ios-webkit-debug-proxy' (1.8.8) was installed successfully!

 

 

 

使用iwdp
终端输入:

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

浏览器访问:http://localhost:9221

 进一步点击:

右键复制蓝色地址,并将chrome-devtools改为devtools(因为后续chrome协议有调整),
回车访问即可,如:
devtools://devtools/bundled/inspector.html?ws=localhost:9222/devtools/page/3

其它
更换 scoop 源

scoop config SCOOP_REPO https://gitee.com/squallliu/scoop
scoop update

安装scoop报错
使用“1”个参数调用“DownloadString”时发生异常:“未能解析此远程名称: 'raw.githubusercontent.com'”

打开hosts文件(C:\Windows\System32\drivers\etc),在最后一行添加如下内容:

199.232.68.133 raw.githubusercontent.com

再次运行安装Scoop命令,至此 Scoop安装完成。

 

参考

https://scoop.sh/
https://gitee.com/squallliu/scoop
http://static.kancloud.cn/idcpj/python/912343

posted @ 2021-05-07 14:20  丁少华  阅读(1005)  评论(0编辑  收藏  举报