Sora by ChatGPT

How to Debug iPhone Safari on Windows

By Written: May 29, 2025

Introduction

For quite a while, I’ve been frustrated by the lack of development tools available for Safari on the iPhone. Apple expects developers to use Mac computers for this purpose. However, I neither have nor want a Mac. I’ve finally found a way to debug Safari on iOS from Windows.

I believe that something similar probably works on Linux as well, though I haven’t had an opportunity to test it yet.

It appears that these techniques rely on some old versions of software, so it’s possible that this approach won’t work forever. But as of May 2025, it works fine.

I want to credit HimbeersaftLP’s iOS Safari Remote Debug Kit. I didn’t end up using it directly, but it helped point me in the right direction.

Installing the Pieces You Need

I prefer using the command line, so my instructions here are all based on PowerShell. Most of these tools can be installed other ways, but for me, running a few commands is quicker and more reliable.

Prerequisites

Git

First, you’ll need Git If you’re a developer, you probably already have it installed. If not, here’s how to get it using winget:

winget install Git.Git

iTunes

Next, install iTunes from the Microsoft Store. It’s required to handle USB communication with your iPhone:

winget install itunes

After installing, launch iTunes and connect your iPhone to your PC via USB. Allow iTunes and your phone to do their authentication and trust dance, babysitting them both until everything is connected.

Scoop

While Scoop isn’t strictly necessary, it’s the easiest way to install iOS WebKit Debug Proxy. Scoop is a command-line installer for Windows.

To install it:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression

The Main Software

Now that the prerequisites are out of the way, it’s time to install the code you need.

For Any Hosting Method

First, you need iOS WebKit Debug Proxy (or iwdp). To install it using Scoop, do:

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

Self Hosting

If you aren’t comfortable with the idea of allowing a third-party website to potentially see your debugging data, self-hosting is a good option. You’ll need to install a bit more here. If you prefer external hosting, you can skip this section.

  1. First, you’ll need the tools to build source code written in Go. Follow the instructions on the Go website to download and install Go. This will require administrator privileges, so if you don’t have those, you’ll have to skip the self-hosting option and go with external hosting, described below.
  2. Clone the git repository into your preferred directory then navigate to it:

    cd your\preferred\directory
    git clone https://git.gay/besties/ios-safari-remote-debug/
    cd ios-safari-remote-debug
    
  3. Now, build the source:

    go build
    
  4. Build and configure the server:

    # Use a current release tag (Otherwise you'll likely have JS bundled in that's too new for your browser)
    ./ios-safari-remote-debug build -t releases/Apple/Safari-17.5-macOS-14.5
    

    Besties notes: “The tag is a tag in the https://github.com/WebKit/WebKit repository. Since github doesn’t allow searching tags, you’ll need to clone the repository manually to look up the tag.”

If this completes without errors, everything is ready to go.

Running the iPhone DevTools

Option 1: Self Hosting

  1. If you’ve installed everything for self-hosting, open a PowerShell window and cd to the project directory:

    cd path\to\ios-safari-remote-debug
    
  2. Launch the self hosting server:

    ./ios-safari-remote-debug serve
    

    If prompted by Windows Firewall, allow access.

  3. In a second PowerShell, start iwdp:

    os_webkit_debug_proxy
    
  4. On your iPhone, open Safari and navigate to the page you want to debug.
  5. On your computer, open a browser (tested in Chrome) and go to http://127.0.0.1:8924.
  6. When you’re done, stop both servers with Ctrl+C.

Option 2: External Hosting

If you’re willing to trust a website controlled by a third party with your debugging data, this is the easiest way to get going.

  1. Connect your phone to your computer via USB.
  2. Launch iTunes
  3. Launch iwdp:

    ios_webkit_debug_proxy
    
  4. On your iPhone, open Safari and navigate to the page you want to debug.
  5. On your computer, open a browser (tested in Chrome) and navigate to https://ios-safari-debug.besties.house/. If it doesn’t connect, follow the troubleshooting tips given there.
  6. When you’re done debugging, stop iwdp with Ctrl+C.