In this repo I explained how to debug or access the Website Console Logs of iOS/iPhone Safari on Windows.
I have attached the screen shots for Iphone and Chrome browser on Windows.
Here's the summarized solution for remote debugging iOS devices > iOS 11.
-
Install iTunes on your Windows 10 PC.
-
Install Node.js.
-
Download the most recent ZIP release file of the
remotedebug-ios-webkit-adapter
-
Install the RemoteDebug iOS WebKit Adapter npm package
npm i -g remotedebug-ios-webkit-adapter
-
Create a new folder named "ios-webkit-debug-proxy-1.9.0-win64-bin"(replace the version with your downloaded version it could be any like 2.0.0 etc) at the following location (assumes you installed Node.js in the default directory)
%AppData%\npm\node_modules\remotedebug-ios-webkit-adapter\node_modules\vs-libimobile\
-
Extract the files from the ZIP to that folder
%AppData%\npm\node_modules\remotedebug-ios-webkit-adapter\node_modules\vs-libimobile\ios-webkit-debug-proxy-1.9.0-win64-bin
-
The folder
vs-libimobile
was missing in my case thus I simply created it. -
Edit the
iosAdapter.js
file. Open the file from the following location%AppData%\npm\node_modules\remotedebug-ios-webkit-adapter\out\adapters\iosAdapter.js
-
Change the
proxy
variable to the following value (path to the ios_webkit_debug_proxy.exe):const proxy = path.resolve(__dirname, '../../node_modules/vs-libimobile/ios-webkit-debug-proxy-1.9.0-win64-bin/ios_webkit_debug_proxy.exe');
-
Go to
%AppData%\npm
, open PowerShell and type in the following command.\remotedebug_ios_webkit_adapter --port=9000
-
Open up Chrome on your Win PC and browse to
chrome://inspect/#devices
for Chrome ORedge://inspect/#devices
on MS-Edge. Since we set the adapter to listen on port9000
, we need to add a network target. Click“Configure”
next to Discover network targets
-
Enable web inspector on your iOS device. Take your iOS device and go to
Settings > Safari > Advanced
and enable Web Inspector. -
Open Safari on your iOS device and browse to a website you need to inspect. You should almost immediately see the website appear in Chrome under the Remote Target section. If not then Reload the
chrome://inspect/#devices
on Windows Chrome browser.
If you want to do everything with PowerShell instead of manually downloading the ios-webkit-adapter Zip file, you can follow this Guide