Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAQ #55

Closed
paulirish opened this issue Sep 14, 2017 · 3 comments · Fixed by #90
Closed

FAQ #55

paulirish opened this issue Sep 14, 2017 · 3 comments · Fixed by #90

Comments

@paulirish
Copy link
Member

paulirish commented Sep 14, 2017

Just wrote a few FAQ entries that I'll add to the site soon. Capturing here for the moment:

How is the protocol defined?

The canonical protocol definitions live in the Chromium source tree: (browser_protocol.json and js_protocol.json). They are maintained manually by the DevTools engineering team. These files are mirrored (hourly) on GitHub in the devtools-protocol repo.

The declarative protocol definitions are used across tools. Within Chromium, a binding layer is created for the Chrome DevTools to interact with, and separately the protocol is used for Chrome Headless's C++ interface.

What's the protocol_externs file?

It's created via generate_protocol_externs.py and useful for tools using closure compiler. The TypeScript story is here.

Are the HTTP endpoints documented?

Not yet. See bugger-daemon's third-party docs. See also the endpoints implementation in Chromium. /json/protocol was added in Chrome 60.

How do I access the browser target?

The endpoint is exposed as webSocketDebuggerUrl in /json/version. Note the browser in the URL, rather than page. If Chrome was launched with --remote-debugging-port=0 and chose an open port, the browser endpoint is written to both stderr and the DevToolsActivePort file in browser profile folder.

@nojvek
Copy link
Contributor

nojvek commented Mar 14, 2018

@paulirish I'm happy to put up a PR to bring the devtools protocol to typescript interface generator inside this repo if you are interested.

Since npm now supports types field right inside package.json, this should make things even easier to consume the protocol.

@paulirish
Copy link
Member Author

@nojvek yes that'd be awesome. :)

@paulirish
Copy link
Member Author

updated (and correct) answers for all of this are now on https://chromedevtools.github.io/devtools-protocol/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants