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
chrome.exe --remote-debugging-port=9222 --user-data-dir="D:\chrome-debug"macOS
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \ --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debugLinux
google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debugConfirm it worked:
curl http://localhost:9222/json/version2. Add it in WebDebugX
Section titled “2. Add it in WebDebugX”- Click Add custom device at the bottom of the device list.
- Enter the IP and the debugging port.
- This machine →
localhost(or127.0.0.1) and9222. - Another machine → that machine’s IP address and its port.
- This machine →
- Confirm. The entry appears in the device list as Localhost or as a custom device.
- Select it and click Refresh to list its open tabs.
Pages open in Chrome DevTools.
Debugging a browser on another machine
Section titled “Debugging a browser on another machine”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-machineThen add
localhost:9222locally. -
The firewall must allow it if you do expose the port directly.
Common problems
Section titled “Common problems”| 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 |