I'm trying to follow the steps described under Basics: Using DevTools as protocol client on https://chromedevtools.github.io/devtools-protocol/. I launch two Chrome instances with google-chrome --remote-debugger-port=9222
and google-chrome --user-data-dir=/home/whatever/Desktop/chrome/
. After that, I navigate to http://127.0.0.1:9222/
but I get a "This site can’t be reached" error page.
If instead of this I launch Chrome with google-chrome --headless --remote-debugging-port=9222
, when I navigate to http://127.0.0.1:9222/
I can see "Inspectable WebContents" and a link to a blank page .
Anyone has an idea on why the remote-debugging-port
flag is only working with a headless instance? From what i can understand it should work both ways.
Note: What I'm attempting is to be able to use Puppeteer on a Chorme instance using the connect
method (https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerconnectoptions).
The Remote Debugger Port on 32-bit Operating Systems You can configure this from either the command line or the remote debugger window. In the remote debugger window, click Tools > Options, and set the TCP/IP port number. On the command line, start the remote debugger with the /port switch: msvsmon /port <port number>.
One can find this option in one of the following locations, depending on the Android version: Android 9 (API level 28) and higher: Settings > System > Advanced > Developer Options > USB debugging.
To debug on a remote IIS web server, open port 80 on the remote computer.
The issue is user-data-dir=
.
You can point to your current profile directory, it may cause some problems. Debugging don't start without this argument.
On windows you can start as:
C:\>"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe " --remote-debugging-port=9222 --user-data-dir=/temp'
From new versions, don't look anymore to http://localhost:9222/
.
The correct way is open a new window and load chrome://inspect
.
Any debugging instance will be show under devices list.
I managed to get it to work by launching chrome as following: google-chrome --remote-debugging-port=9222 --user-data-dir=/home/whatever/Desktop/chrome/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With