Using this project you can debug your websites and web applications running in iOS Safari from a PC running Windows or Linux.
It provides a free and up-to-date alternative to the discontinued remotedebug-ios-webkit-adapter by RemoteDebug and is the spiritual successor to the abandoned webkit-webinspector by Arty Gus. It is a free and open source alternative to inspect.dev.
The setup scripts (generate.sh
or generate.ps1
) download the latest version of WebKit's built-in WebInspector and patch it to work with the WebSocket ios-webkit-debug-proxy
provides and to be compatible with Chromium based browsers.
If you are looking for a more modern, self-contained tool built in Go, check out Hazel's ios-safari-remote-debug.
ios-webkit-debug-proxy
npm i -g http-server
and you're set.git
(required by generate.sh
or generate.ps1
) for downloading WebKit source code
git
for Windows in PowerShellgit
from your package managergenerate.ps1
. On Linux, run generate.sh
.This will result in the folder WebKit
being created inside src
. It contains the WebInspector files.
Settings->Safari->Advanced->Web Inspector
and enable itstart.ps1
. On Linux, run start.sh
. Make sure your iOS device's screen is unlocked.ios-webkit-debug-proxy
will show your iOS device's name as connected.http://localhost:8080/Main.html?ws=localhost:9222/devtools/page/1
Uncaught (in promise) Error: 'Browser' domain was not found
from Connection.js:162
you are trying to inspect a page that is not inspectable (this could be caused by having Safari extensions installed). Refer to http://localhost:9222/ for the available pages and put the correct one at the end of the URL (for example http://localhost:8080/Main.html?ws=localhost:9222/devtools/page/2
) for inspecting the second page.WebSocket connection to 'ws://localhost:9222/devtools/page/1' failed:
from InspectorFrontendHostStub.js:68
, try unplugging your device and plugging it back in while the site you want to debug is open in Safari. Once you see the ios-webkit-debug-proxy console window display a message like Connected :9222 to Himbeers iPad (...)
, refresh the inspector page inside your browser (do not use the refresh button on the inspector page, refresh the entire site from your browser).ios-webkit-debug-proxy
.ios-webkit-debug-proxy
window, the other one will close automatically
If you want to see details about how this was made, you can read a detailed explanation in HOW_IT_WORKS.md
(note that this document only describes how the very first version of this tool was created and might not be completely up-to-date).