block by paulirish 2d84a6db1b41b4020685

How to build Chromium to hack on DevTools

A Chromium Compiling Setup for DevTools Hackers

Devtools hacking

Follow https://github.com/ChromeDevTools/devtools-frontend/blob/main/docs/workflows.md

The dtb and dtcr commmands here are nice.

More

Please read this doc: Chrome DevTools Contribution Guide

Chromium hacking

  1. Set the args.gn as your gn build configuration
    • Probably best to run gn args out/Default and copy/paste what you want to use, then save.
  2. source chromium.sh
  3. git pull && depsbcr

That’s it. You can also run the various components of the bash script seperately and together.

I often do this sequence: git pull && deps && bcr followed by hacking followed by bcr, bcr, bcr.

Useful setup guides:

https://chromium.googlesource.com/chromium/src/+/HEAD/docs/clangd.md https://chromium.googlesource.com/chromium/src/+/HEAD/docs/vscode.md

Googlers:

Protips:

args.gn

chromium.sh