devtools-protocol icon indicating copy to clipboard operation
devtools-protocol copied to clipboard

"Getting started" and "Basics" in the documentation not working

Open adriancch-inditex opened this issue 3 years ago • 1 comments

I reported this issue here, but I'm not 100% sure if that was the correct place so I'm referencing it in this repository too. If you think this is NOT the correct place, feel free to close this issue.

Environment

Component Version Node.js N/A Client (Chrome/Chromium/...) Chrome Version 105.0.5195.127 OS running Node.js N/A OS running the client Windows 10 Pro (Version 21H2, OS build 19044.2006) chrome-remote-interface N/A Is the client running in a container? NO

Description

In https://chromedevtools.github.io/devtools-protocol/, in th "Resources" section there is a link: Getting Started with CDP. This link points to a README.md file in another repository that says the following:

Protocol Fundamentals

When Chromium is started with a --remote-debugging-port=0 flag, it starts a Chrome DevTools Protocol server and prints its WebSocket URL to STDERR. The output looks something like this:

DevTools listening on ws://127.0.0.1:36775/devtools/browser/a292f96c-7332-4ce8-82a9-7411f3bd280a

However, running the command chrome.exe --remote-debugging-port=0 doesn't output anything.

Also, in Basics: Using DevTools as protocol client it says that if you run chrome.exe --remote-debugging-port=9222 then you should be able to open http://localhost:9222/ with a web browser, but when I do I don't see anything. It's just a blank page.

Example

N/A

adriancch-inditex avatar Sep 21 '22 22:09 adriancch-inditex

According to what "cyrus-and" said:

Also, in Basics: Using DevTools as protocol client it says that if you run chrome.exe --remote-debugging-port=9222 then you should be able to open http://localhost:9222/ with a web browser, but when I do I don't see anything. It's just a blank page.

Yes this used to be the case. Now I think that page has been removed, now you can just navigate to chrome://inspect. In any case, it doesn't matter if you're going to instrument the instance with JavaScript.

Hope it helps!

Would you mind to reflect that in the documentation?

adriancch-inditex avatar Sep 22 '22 08:09 adriancch-inditex

Solution: add --enable-logging to see the WebSocket URL in your terminal.

I found this issue in search results but ended up having to dig in Chromium source code, so hopefully this might save some time for others in the future. :)

deltaidea avatar Mar 18 '24 06:03 deltaidea