blob: 8d782ab29431f18f3cdbc57574dfe8886301d28b [file] [log] [blame] [view]
Yang Guo4fd355c2019-09-19 08:59:031# Chrome DevTools frontend
2
3<!-- [START badges] -->
4[![NPM package](https://img.shields.io/npm/v/chrome-devtools-frontend.svg)](https://npmjs.org/package/chrome-devtools-frontend)
5<!-- [END badges] -->
6
7The client-side of the Chrome DevTools, including all JS & CSS to run the DevTools webapp.
8
Yang Guo4fd355c2019-09-19 08:59:039### Source code
10The frontend is available on [chromium.googlesource.com](https://chromium.googlesource.com/devtools/devtools-frontend).
11
Yang Guo2b9efe82019-10-21 10:06:3412### Getting Started (Standalone)
Yang Guo4fd355c2019-09-19 08:59:0313
14As standalone project, Chrome DevTools front-end can be checked out and built independently from Chromium.
15
16#### Checking out source
17
18[Get depot_tools](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up) first.
19
20```bash
21mkdir devtools
22cd devtools
23git clone https://chromium.googlesource.com/devtools/devtools-frontend
24gclient config https://chromium.googlesource.com/devtools/devtools-frontend --unmanaged
25```
26
27#### Build
28```bash
29gclient sync
30gn gen out
31autoninja -C out
32```
33
Yang Guo2b9efe82019-10-21 10:06:3434#### Run in Chromium (from M79 onwards)
Yang Guo4fd355c2019-09-19 08:59:0335```bash
36<path-to-chrome>/chrome --custom-devtools-frontend=$(realpath out/resources/inspector)
37```
38
Yang Guo2b9efe82019-10-21 10:06:3439### Getting Started (as part of Chromium)
40
41DevTools frontend can also be developed as part of Chromium.
42
43Follow [instructions](https://www.chromium.org/developers/how-tos/get-the-code) to check out Chromium.
44DevTools frontend can be found under `chromium/src/third_party/devtools-frontend/src/`.
45
46#### Build as part of Chromium
47
48Refer to [instructions](https://www.chromium.org/developers/how-tos/get-the-code) to build Chromium.
49To only build DevTools frontend, use `devtools_frontend_resources` as build target.
50
Yang Guo4fd355c2019-09-19 08:59:0351### Hacking
52* DevTools documentation: [devtools.chrome.com](https://devtools.chrome.com)
53* [Debugging protocol docs](https://developer.chrome.com/devtools/docs/debugger-protocol) and [Chrome Debugging Protocol Viewer](http://chromedevtools.github.io/debugger-protocol-viewer/)
54* [awesome-chrome-devtools](https://github.com/paulirish/awesome-chrome-devtools): recommended tools and resources
55* Contributing to DevTools: [bit.ly/devtools-contribution-guide](http://bit.ly/devtools-contribution-guide)
56* Contributing To Chrome DevTools Protocol: [docs.google.com](https://docs.google.com/document/d/1c-COD2kaK__5iMM5SEx-PzNA7HFmgttcYfOHHX0HaOM/edit?usp=sharing)
57
58### Useful Commands
59
60#### `npm run format-py`
61Formats your Python code using [yapf](https://github.com/google/yapf)
62
63> Note: Yapf is a command line tool. You will have to install this manually, either from PyPi through `pip install yapf` or if you want to enable multiprocessing in Python 2.7, `pip install futures`
64
65### Development
66* All devtools commits: [View the log], [RSS feed] or [@DevToolsCommits] on Twitter
67* [All open DevTools tickets] on crbug.com
68* File a new DevTools ticket: [new.crbug.com](https://bugs.chromium.org/p/chromium/issues/entry?labels=OS-All,Type-Bug,Pri-2&components=Platform%3EDevTools)
69* Code reviews mailing list: [devtools-reviews@chromium.org]
70* [Test waterfall]
71
Yang Guo2b9efe82019-10-21 10:06:3472### NPM package
73
74DevTools frontend is available on NPM as the [chrome-devtools-frontend](https://www.npmjs.com/package/chrome-devtools-frontend) package. It's not currently available via CJS or ES2015 modules, so consuming this package in other tools may require [some effort](https://github.com/paulirish/devtools-timeline-model/blob/master/index.js).
75
76The version number of the npm package (e.g. `1.0.373466`) refers to the Chromium commit position of latest frontend git commit. It's incremented with every Chromium commit, however the package is updated roughly daily.
77
Yang Guo4fd355c2019-09-19 08:59:0378### Getting in touch
79* [@ChromeDevTools] on Twitter
80* Chrome DevTools mailing list: [groups.google.com/forum/google-chrome-developer-tools](https://groups.google.com/forum/#!forum/google-chrome-developer-tools)
81
82 [[email protected]]: https://groups.google.com/a/chromium.org/forum/#!forum/devtools-reviews
83 [RSS feed]: https://feeds.peter.sh/chrome-devtools/
84 [View the log]: https://chromium.googlesource.com/devtools/devtools-frontend/+log/master
85 [@ChromeDevTools]: http://twitter.com/ChromeDevTools
86 [@DevToolsCommits]: http://twitter.com/DevToolsCommits
87 [all open DevTools tickets]: https://bugs.chromium.org/p/chromium/issues/list?can=2&q=component%3APlatform%3EDevTools&sort=&groupby=&colspec=ID+Stars+Owner+Summary+Modified+Opened
88 [Test waterfall]: https://ci.chromium.org/p/devtools-frontend/g/main/console