Using Chromium Remote Debugging from External Device Using Chromium Remote Debugging from External Device google-chrome google-chrome

Using Chromium Remote Debugging from External Device


As you've mentioned it, the solution is to forward the port 9222. Below you find approaches for Linux and Windows.

Linux

After having started chrome with

chrome --remote-debugging-port=9222

Forward the port

ssh -L 0.0.0.0:9223:localhost:9222 localhost -N

This way you can access the debuggin interface from an external device on port 9223 using a Chrome browser.

Windows

As seen in this answer, on windows (tested on 7,8) the easiest way to do portforwarding without 3rd party apps is via netsh

I've created a batch file with the following content. It has to be ran as administrator, and with no previous chrome windows open:

netsh interface portproxy delete v4tov4 listenport=9222 listenaddress=0.0.0.0start /b cmd /c call "\program files\google\chrome\application\chrome.exe" -remote-debugging-port=9222timeout 5netsh interface portproxy add v4tov4 listenport=9222 connectaddress=127.0.0.1 connectport=9222 listenaddress=0.0.0.0

This way you can access the debuggin interface from an external device on port 9222.

Make also sure that no firewall is blocking the corresponding port.


You can achieve the same behaviour by adding the argument--remote-debugging-address=[YOUR_EXTERNAL_IP_ADDRESS] as reported here, without any additional software other than Chrome itself.


I've successfully used RInetD for easy port-forwarding in Windows 7, tried this and it worked like a charm, externally debugging a Chrome browser in Windows from a Chrome in Mac/Ubuntu.

You can download rinetd from:

http://www.boutell.com/rinetd/

Unzip the file, create an empty file with any name (I used rinetd.conf), with this content:

0.0.0.0 9223 127.0.0.1 9222

The in Windows console run it with:

rinetd.exe -c rinetd.conf

And voila!