Skip to content

Commit 9f9dab0

Browse files
authored
docs: add VM-to-host remote debugging workaround (#399)
I think this part should be included in the document, I investigated it for a long time at first, and it's not just me: #328 #131 #139
1 parent 24d2a13 commit 9f9dab0

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,8 @@ Check the performance of https://developers.chrome.com
421421

422422
Your MCP client should connect to the running Chrome instance and receive a performance report.
423423

424+
If you hit VM-to-host port forwarding issues, see the “Remote debugging between virtual machine (VM) and host fails” section in [`docs/troubleshooting.md`](./docs/troubleshooting.md#remote-debugging-between-virtual-machine-vm-and-host-fails).
425+
424426
For more details on remote debugging, see the [Chrome DevTools documentation](https://developer.chrome.com/docs/devtools/remote-debugging/).
425427

426428
## Known limitations

docs/troubleshooting.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,14 @@ npm cache clean --force
2727
This indicates that the browser could not be started. Make sure that no Chrome
2828
instances are running or close them. Make sure you have the latest stable Chrome
2929
installed and that [your system is able to run Chrome](https://support.google.com/chrome/a/answer/7100626?hl=en).
30+
31+
### Remote debugging between virtual machine (VM) and host fails
32+
33+
When connecting DevTools inside a VM to Chrome running on the host, any domain is rejected by Chrome because of host header validation. Tunneling the port over SSH bypasses this restriction. In the VM, run:
34+
35+
```sh
36+
ssh -N -L 127.0.0.1:9222:127.0.0.1:9222 <user>@<host-ip>
37+
```
38+
39+
Point the MCP connection inside the VM to `http://127.0.0.1:9222` and DevTools
40+
will reach the host browser without triggering the Host validation.

0 commit comments

Comments
 (0)