An error was reported when Chrome called, so I won’t introduce it here.
The Safari browser is Apple’s supporting browser. If you use macOS, you can use a data cable to get it done. Helpless, many developers like me use Windows computers, and then I began to look for ways to debug iOS mobile browsers on the window system .
First you need to install the dependencies
Note: The following operations need to be performed under Window PowerShell (because the package manager of window needs to be installed, cmd cannot be downloaded)
*
1. Install scoop (a package management tool for windows) *
#修改执行策略,选择是 A 全是
set-executionpolicy unrestricted -s cu
#安装scoop
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
2. Install ios_webkit_debug_proxy through scoop
# 安装 extras
scoop bucket add extras
# 安装 ios-webkit-debug-proxy
scoop install ios-webkit-debug-proxy
3. Install and debug dependent packages
npm install vs-libimobile -g
npm install remotedebug-ios-webkit-adapter -g
4. Open ios debugging
First open the settings , select the Safari browser , slide to the bottom, select advanced , open the web page inspector inside , and save JavaScript to open by the way.
5. Install iTunes or Aisi Assistant (here I installed iTunes)
iTunes needs to log in, and then bind the device. A mobile phone can bind up to 5 PC devices. After the binding is completed, click the account authorization to view your mobile phone.
6. Start debugging
Connect the mobile phone with a data cable, open iTunes, and then execute (specify port 9000):
remotedebug_ios_webkit_adapter --port=9000
Then open edge://inspect/#devices (that is, the debugging interface of the edge browser)
Configure the port, because I started listening on 9000. So use localhost:9000
to refresh the mobile browser interface, and you can see the content of the browser after a while.
Click inspect to see the interface even if you're done.
Summarize:
There are so many bugs in ios, and all of them are inexplicable bugs.