|
1 | 1 | # Chrome Debugging Protocol
|
2 | 2 |
|
3 |
| -We keep multiple versions of the protocol in the tree in order to allow |
4 |
| -us to generate bindings as needed. |
5 |
| - |
6 |
| -They are typically downloaded from the [devtools |
7 |
| -source](https://github.com/ChromeDevTools/devtools-protocol/tree/master/json) |
8 |
| - |
9 |
| -Fortunately both Chrome and Edge are based off Chromium releases and those |
10 |
| -are OSS. In order to get the versions of the protocol spoken by particular |
11 |
| -releases of Chrome: |
12 |
| - |
13 |
| -* Find out the latest version of [Stable Channel Update for Desktop](https://chromereleases.googleblog.com/search/label/Stable%20updates) |
14 |
| - (e.g., `84.0.4147.125`). |
15 |
| - * Navigate to the [Chromium source](https://github.com/chromium/chromium/) |
16 |
| - * Open the tag matching the release number. |
17 |
| - * Grab `//third_party/blink/public/devtools_protocol/browser_protocol.pdl` |
18 |
| - (Quick link: `https://raw.githubusercontent.com/chromium/chromium/<LATEST_VERSION_NUMBER>/third_party/blink/public/devtools_protocol/browser_protocol.pdl`) |
19 |
| - * Now figure out the version of v8 used by the version of Chromium. In |
20 |
| - Chromium's source, navigate to `//:DEPS` and search for `v8_revision` |
21 |
| - (Quick link: `https://github.com/chromium/chromium/blob/<LATEST_VERSION_NUMBER>/DEPS#:~:text=the%20commit%20queue%20can%20handle%20cls%20rolling%20v8`) |
22 |
| - * Head over to the [v8 source](https://github.com/v8/v8) and switch to |
23 |
| - the indicated revision (e.g., `451d38b60be0a0f692b11815289cf8cbc9b1dc98`) |
24 |
| - * Grab `//include:js_protocol.pdl` |
25 |
| - (Quick link: `https://github.com/v8/v8/raw/<V8_REVISION_NUMBER>/include/js_protocol.pdl`) |
26 |
| - |
27 |
| -You may also find the same information at the [OmahaProxy CSV |
28 |
| -Viewer](https://omahaproxy.appspot.com) |
29 |
| - |
30 |
| -We have a modified form of the scripts used by Chromium to generate the |
31 |
| -protocol files. The originals were in: |
32 |
| - |
| 3 | +We keep multiple versions of the protocol in the tree in order to allow us to generate bindings as |
| 4 | +needed. |
| 5 | + |
| 6 | +They are typically downloaded from the [devtools source][] |
| 7 | + |
| 8 | +Fortunately both Chrome and Edge are based off Chromium releases and those are OSS. In order to get |
| 9 | +the versions of the protocol spoken by particular releases of Chrome: |
| 10 | + |
| 11 | +* Find out the latest version of [Stable Channel Update for Desktop][] (e.g., `96.0.4664.45`). |
| 12 | +* Create a `vXX` directory under `//common/devtools/chromium` (e.g. `v96` for `96.0.4664.45`) |
| 13 | +* Copy the `BUILD.bazel` file from the `vXX-1` directory. |
| 14 | +* Navigate to the [Chromium source][] and open the tag matching the release number. |
| 15 | +* Find `//third_party/blink/public/devtools_protocol/browser_protocol.pdl` and download the file |
| 16 | + to `//common/devtools/chromium/vXX`. |
| 17 | + * (Quick link: |
| 18 | + `https://raw.githubusercontent.com/chromium/chromium/<LATEST_VERSION_NUMBER>/third_party/blink/public/devtools_protocol/browser_protocol.pdl`) |
| 19 | +* Now figure out the version of v8 used by the version of Chromium. In Chromium's source, navigate |
| 20 | + to `//:DEPS` and search for `v8_revision` |
| 21 | + * (Quick |
| 22 | + link: `https://github.com/chromium/chromium/blob/<LATEST_VERSION_NUMBER>/DEPS#:~:text=the%20commit%20queue%20can%20handle%20cls%20rolling%20v8`) |
| 23 | +* Head over to the [v8 source](https://github.com/v8/v8) and switch to the indicated revision |
| 24 | + * (e.g., `451d38b60be0a0f692b11815289cf8cbc9b1dc98`) |
| 25 | +* Find `//include/js_protocol.pdl` and download the file to `//common/devtools/chromium/vXX`. |
| 26 | + (Quick link: `https://github.com/v8/v8/raw/<V8_REVISION_NUMBER>/include/js_protocol.pdl`) |
| 27 | + |
| 28 | +You may also find the same information at the [OmahaProxy CSV Viewer][] |
| 29 | + |
| 30 | +We have a modified form of the scripts used by Chromium to generate the protocol files. The |
| 31 | +originals were in: |
| 32 | + |
33 | 33 | https://github.com/chromium/chromium/blob/master/third_party/inspector_protocol/convert_protocol_to_json.py
|
| 34 | + |
| 35 | +[devtools source]: https://github.com/ChromeDevTools/devtools-protocol/tree/master/json |
| 36 | + |
| 37 | +[Stable Channel Update for Desktop]: https://chromereleases.googleblog.com/search/label/Stable%20updates |
| 38 | + |
| 39 | +[Chromium source]: https://github.com/chromium/chromium/ |
| 40 | + |
| 41 | +[OmahaProxy CSV Viewer]: https://omahaproxy.appspot.com |
0 commit comments