Skip to content

Debug a browser (local or remote)

WebDebugX is not limited to phones. Any Chromium-based browser started with a remote debugging port can be added as a device, whether it runs on this computer or on a machine across the room.

1. Start the browser with a debugging port

Section titled “1. Start the browser with a debugging port”

The browser must be launched with the flag; you cannot turn it on in an already-running instance.

Windows

Terminal window
chrome.exe --remote-debugging-port=9222 --user-data-dir="D:\chrome-debug"

macOS

Terminal window
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
--remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug

Linux

Terminal window
google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug

Confirm it worked:

Terminal window
curl http://localhost:9222/json/version
  1. Click Add custom device at the bottom of the device list.
  2. Enter the IP and the debugging port.
    • This machine → localhost (or 127.0.0.1) and 9222.
    • Another machine → that machine’s IP address and its port.
  3. Confirm. The entry appears in the device list as Localhost or as a custom device.
  4. Select it and click Refresh to list its open tabs.

Pages open in Chrome DevTools.

Two things have to be true, and neither is WebDebugX’s doing:

  • The port must be reachable. Chromium binds the debugging port to loopback by default, so a remote machine cannot reach it without extra work — an SSH tunnel is the usual and safest answer:

    Terminal window
    ssh -L 9222:localhost:9222 user@that-machine

    Then add localhost:9222 locally.

  • The firewall must allow it if you do expose the port directly.

Symptom Cause
Port open, no pages listed The browser was started on an existing profile — relaunch with --user-data-dir
Connection refused The browser is not running with the flag, or the port differs
Works locally, not remotely The port is bound to loopback; use an SSH tunnel
“Device already exists” That IP and port pair is already in the list