Skip to content

Commit e1756db

Browse files
author
root
committed
docs: add troubleshooting for --browserUrl (remote debugging)
1 parent df246d9 commit e1756db

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

docs/troubleshooting.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,34 @@ ssh -N -L 127.0.0.1:9222:127.0.0.1:9222 <user>@<host-ip>
7171

7272
Point the MCP connection inside the VM to `http://127.0.0.1:9222`. This allows DevTools to reach the host browser without triggering the Host validation error.
7373

74+
### Connecting to a running Chrome instance (remote debugging, 9222)
75+
76+
If you want `chrome-devtools-mcp` to attach to an existing Chrome instance, start Chrome with remote debugging enabled, then pass `--browserUrl`.
77+
78+
1. Start Chrome with a remote debugging port:
79+
80+
- Linux:
81+
```sh
82+
google-chrome --remote-debugging-port=9222
83+
```
84+
85+
- macOS:
86+
```sh
87+
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
88+
```
89+
90+
2. Verify the endpoint is reachable:
91+
92+
- `http://127.0.0.1:9222/json/version` should return JSON
93+
94+
3. Start the MCP server and point it at the debugging endpoint:
95+
96+
```sh
97+
npx --yes chrome-devtools-mcp@latest --browserUrl http://127.0.0.1:9222
98+
```
99+
100+
See also: `examples/remote-debugging-9222.mjs`.
101+
74102
### Operating system sandboxes
75103

76104
Some MCP clients allow sandboxing the MCP server using macOS Seatbelt or Linux

0 commit comments

Comments
 (0)