Skip to content

iOS WebKit Debug Proxy guide

WebKit Debug Proxy is a tool for debugging web content on iOS devices. This guide will help you set up and use WebKit Debug Proxy for iOS device debugging.

Tip: this is the command-line route and it needs macOS. If you just want to debug iOS pages from Windows, macOS or Linux without configuring a proxy, use iOS Safari debugging instead.

Terminal window
# Install Homebrew (if you do not have it)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install WebKit Debug Proxy
brew install ios-webkit-debug-proxy
  1. Enable Web Inspector on the iOS device:

    • Open Settings > Safari > Advanced
    • Enable Web Inspector
  2. Connect the device:

    • Connect the iOS device to the Mac with a USB cable
    • Trust the computer on the device
Terminal window
ios_webkit_debug_proxy
  1. Open Safari
  2. Open Safari’s Develop menu on the Mac
  3. Select the iOS device you want to debug
  4. Select the page you want to debug
  • Element inspection
  • JavaScript debugging
  • Network analysis
  • Performance analysis
Terminal window
ios_webkit_debug_proxy -c [device-id]:[port]
Terminal window
ios_webkit_debug_proxy -p [port]
Terminal window
ios_webkit_debug_proxy -d [output-directory]
  1. Device not found

    • Check the USB connection
    • Confirm the device has trusted the computer
    • Restart the device and the proxy
  2. Connection fails

    • Check whether the port is already in use
    • Confirm Web Inspector is enabled
    • Try restarting the proxy
  3. Unstable debugging

    • Check the network connection
    • Update WebKit Debug Proxy
    • Restart the device and the computer
  • Use the latest version of WebKit Debug Proxy
  • Keep the iOS / macOS versions on the device and computer up to date
  • Clear out old debugging session records regularly
  • Use workspaces to manage multiple debugging projects