A VS Code extension for developing any Chromium checkout on Windows, macOS and Linux. It works with zero config (gn + autoninja + the standard chrome executables) and needs no other VS Code extension for debugging. A project only overrides what differs, usually the build command.
- Build configurations: each one is an out dir with an optional build command override (default
autoninja), executable and symbol paths, picked in the status bar or the panel.
- Undeclared out dirs appear automatically.
- Each configuration generates
compile_commands.json and applies it to clangd: clangd.path, --compile-commands-dir, then a clangd restart.
- Launch profiles and flag toggles: remote debugging (CDP), UI DevTools, logging, WebUI from disk, features and switches from a searchable catalog of the checkout, and per-process auto-attach gates.
- Grouped developer switches cover incognito, extensions, background networking and throttling, renderer hang monitoring, GPU benchmarking, precise memory info, and web/native repaint overlays. Local web testing options cover localhost certificates, certificate checks, web security, and the sandbox. New switches are off by default; hover a control for its exact switch and effect. Changes apply to the next Debug or Run, and Reset restores profile defaults.
- Debugging on every OS:
- lldb-dap with Chromium's
tools/lldb helpers, through one shared server per window, so child attaches take about a second instead of 90.
- Renderer, GPU and utility processes are attached automatically.
- Breakpoint presets and named breakpoint sets.
- Crash dumps open in the debugger.
- Chrome UI debugging in VS Code, native and WebUI: use Debug → DevTools & browser UI, alongside process controls and breakpoints. Its commands start with
crdev: Chrome UI:. Build & Debug for Chrome UI (or the Chrome UI (native + WebUI) profile) sets everything below up in one go.
- Native UI (Views): C++ in the crdev session, plus Inspect (Views), which opens UI DevTools (the Views tree, properties and highlight) in an editor tab. In browser opens the browser's native UI inspector entry point.
- If UI DevTools is off, Inspect (Views) offers to enable it and restart that browser with its existing settings and Run/Debug mode.
- WebUI: Debug WebUI JS attaches VS Code's own JavaScript debugger to
chrome:// pages and to WebUI in the browser UI (omnibox popup, side panels, tab search), next to the C++ sessions.
- DevTools… opens the browser's DevTools for any of these targets in a VS Code tab.
- Breakpoints in the checkout's
.ts files need the gn arg enable_webui_inline_sourcemaps = true.
- CDP connections, WebSocket copying and target selection live in the same section.
- Live tools: CDP page watches, a filtered browser-log tail with click-to-source, a crash inbox with analysis and live dump capture, and a gtest runner (find, build, run, debug, re-run failed).
- UMA/UKM: a dedicated tab for searchable UMA histogram watches and read-only UKM event snapshots. Existing histogram watches move here automatically; Watch contains JavaScript expressions and page performance metrics.
- Network: whole-browser NetLog capture, including internal-service requests, DNS, proxy, sockets, and HTTP events. Filter and inspect source events or save the complete capture. Optional live Web content capture provides request/response bodies and WebSocket messages.
- Perfetto traces: record a running browser, save a native Perfetto trace, and open its timeline in Perfetto. Supports timed and manual capture, custom categories, and existing trace files.
- Toolkit panel: a webview in its own activity-bar view, organized in pages so nothing hides at the bottom of a long scroll: Launch · Debug · Network · Perfetto · UMA/UKM · Flags · Watch · Logs · Crashes · Tests · Doctor.
- The shared toolbar offers Build & Debug, Debug, Run, and Build. Native breakpoints and stepping need Debug or Attach; child auto-attach needs Debug; Perfetto, UMA/UKM, and page watches also work with Run when CDP is enabled. Relevant pages explain their requirements.
- GN files: highlighting, completion, hover, go to definition, outline, diagnostics and
gn format for BUILD.gn, .gni and args.gn, with Build, Graph and Copy label above each target, and an interactive dependency graph resolved by gn. See GN files.
- Mojom files: highlighting, completion, hover, go to definition, references, outline, workspace symbols, the bindings generator's checks as you type and the checkout's own formatter for
.mojom files, with a C++ lens that opens the generated class. See Mojom files.
- Config help:
- A JSON schema gives IntelliSense in
crdev.jsonc and crdev.team.jsonc.
- crdev: Generate Annotated Config writes every option, commented out, with descriptions and defaults.
- Configs from a repo only run commands in a trusted workspace.
Status: public beta.
GN files
BUILD.gn, .gni, args.gn and the .gn dotfile open as GN, with syntax highlighting (also in Markdown ```gn blocks). Labels resolve from the outermost .gn in the workspace folder, so files in nested projects such as third_party/skia still resolve against the Chromium root.
- Completion: the variables of the target, config or tool block you are in. For a template invocation, that is the variables the template reads from
invoker. At statement level you also get built-in functions, target types and the templates visible through imports and the build config, inserted as snippets. In strings you get labels (": lists this file's targets, "// lists directories, "//base: lists the targets of //base/BUILD.gn), import() paths, source files and $variables.
- Go to definition (F12, Ctrl/Cmd+click): labels open the target's declaration;
import() paths and source files open the file; template calls open the template() that defines them, including the build config's wrappers of executable, source_set and so on; variables and build arguments open their assignment or declare_args() entry.
- Hover: built-in functions, target types and variables, a template's doc comment and the variables it reads, a label's target type and location, and a build argument's doc comment and default.
- Outline and breadcrumbs: targets, configs, templates, toolchains, imports and
declare_args() arguments.
- Diagnostics: syntax errors (the same messages gn reports), imports that do not exist, and literal
sources, public, inputs and script paths in BUILD.gn that are missing. Turn them off with crdev.gn.diagnostics.
- Build arguments: in a trusted workspace, crdev runs
gn args <out dir> --list --json once per out dir and caches the result until args.gn or build.ninja changes. In args.gn, completion lists every argument with its default and docs, hover shows the current and default values, and go to definition opens the declaration. In other GN files, hover uses the selected configuration's out dir. Turn this off with crdev.gn.buildArgs.
- Format Document runs
gn format --stdin (trusted workspaces only). crdev uses the gn that generated the selected out dir, read from its build.ninja, so forks with their own gn get it. Then it tries the checkout's buildtools, then gn on PATH, or crdev.tools.gn when set. To format on save, set "[gn]": { "editor.formatOnSave": true }.
- CodeLens: Build builds the target with the selected configuration (
autoninja -C out/X base:base), Graph opens its dependency graph, and Copy label copies //base:base. crdev: GN: Build Target at Cursor and crdev: GN: Copy Target Label do the same from the cursor. Turn the lenses off with crdev.gn.codeLens.
- Dependency graph (Graph, or crdev: GN: Show Dependency Graph): the target with its dependents on the left and its deps on the right, laid out by ELK. The graph is gn's own, resolved for the selected configuration's out dir (
gn desc <out> //* deps, trusted workspaces only), so it includes conditional deps and the targets templates generate. It loads once per out dir and is cached until args.gn or build.ninja changes; Reload runs gn again after you edit build files.
- Click a target to open its declaration in BUILD.gn (Ctrl/Cmd+click: to the side). Template-generated targets open the template call that made them.
- +N chips add the next batch of deps or dependents (
crdev.gn.graph.maxChildren, 25 by default).
- Right-click a target to show its deps or dependents, Re-root here, Build, Copy label or Hide it. Show path to the focus (or, on the focus, Why does it depend on…) highlights the shortest chain of deps between two targets.
- Dashed borders mark testonly targets; muted text marks targets in another toolchain. Export copies Mermaid or DOT, or saves a PNG.
- Run the command from a source file to graph the target that lists it, or with nothing at the cursor to pick any target of the out dir.
- crdev: GN: Open BUILD.gn Listing This File (also in the editor context menu of source files) opens the
BUILD.gn line that lists the current file, searching from its directory up to the root.
If another extension already provides GN completion and navigation, turn off crdev.gn.languageFeatures. Highlighting and formatting stay.
Mojom files
.mojom files get syntax highlighting (also in Markdown ```mojom blocks). Names resolve the way the bindings generator (mojom/generate/translate.py) resolves them: a file sees its own definitions and those of the files it imports directly, from the innermost scope outwards. Imports are paths from the source root (the outermost .gn), or from an out dir's gen/ for generated mojoms, with the selected configuration's out dir first.
- Completion: at a struct or union member, built-in types,
array/map/pending_remote<…> and the visible structs, unions and enums, named as you can write them here (TimeDelta within its own module, mojo_base.mojom.TimeDelta elsewhere; typing mojo_base. narrows to that module). pending_remote< lists interfaces, map keys list primitives and enums. After =, the values of the field's enum unqualified, constants and true/false/default. In [...], the attributes Chromium allows on what follows (on a method: Sync, MinVersion, …), then their values: EnableIf= lists the platform features and the ones the file already uses; RuntimeFeature= lists mojom features. In an import string, directories and .mojom files of the source root and gen/.
- Go to definition (F12, Ctrl/Cmd+click): type names, enum values, constants and features open their definition, in this file or an imported one (including generated mojoms in
gen/); import paths open the file. Definitions under EnableIf with variants for other platforms list them all.
- Find All References (Shift+F12): the uses of a struct, union, interface, enum, enum value, constant or feature in every mojom of the workspace that can see it.
- Hover: a definition's source and doc comment, its full name and where it is defined, an enum value's number, an attribute's meaning and where it is allowed, built-in types and keywords.
- Outline, breadcrumbs and Go to Symbol in Workspace (Ctrl/Cmd+T): structs, unions, interfaces with their methods, enums with their values, constants and features.
- Diagnostics: syntax errors (the parser's own messages), imports that are not found, unknown types and values (skipped while an import is missing, since they may be in it), and the generator's checks: attributes not allowed where they are used (with a "Did you mean" hint), duplicate attributes and names,
[Stable] without [Extensible], [Default] rules for enums and unions, non-contiguous struct ordinals, [Sync] without a response, RuntimeFeature values that are not features, and a [Stable] definition that depends on one that is not. Turn them off with crdev.mojom.diagnostics.
- Format Document runs the checkout's
mojo/public/tools/mojom/mojom_format.py (what git cl format uses) on the document, in a trusted workspace. It needs Python 3: python3 or python on PATH, or crdev.tools.python. To format on save, set "[mojom]": { "editor.formatOnSave": true }.
- CodeLens: once the bindings are generated, C++ (and Blink for mojoms with a Blink variant) above each struct, union, interface and enum opens its generated class in
out/X/gen/…mojom.h, -blink.h or, for enums, -data-view.h. crdev: Mojom: Open Generated Bindings (also in the editor context menu) lists all the generated files of the current mojom. Turn the lenses off with crdev.mojom.codeLens.
If another extension already provides mojom completion and navigation, turn off crdev.mojom.languageFeatures. Highlighting and formatting stay.
Feature flags
On Launch, enter comma-separated names in Enable features and Disable features.
These fields share their selection with the searchable Flags page and apply on the next launch.
To set profile defaults in .vscode/crdev.jsonc:
{
"profiles": {
"renderers": {
"flags": {
"features": {
"enable": ["FeatureA", "FeatureB"],
"disable": ["FeatureC"]
}
}
}
}
}
Custom crash folders
On Crashes, use Add folder to select one or more dump folders, Crashpad databases, or browser user-data folders.
The inbox searches those locations and their known crash subfolders alongside the automatic locations.
Added folders are saved for this workspace. Expand Folders searched to remove a location; this keeps its files.
Crash symbols
On Crashes, use Add symbols to choose symbol files or macOS .dSYM bundles, or Add symbol folder to add search directories.
These entries are saved for this workspace and apply to both Analyze and Debug, together with the selected build configuration's symbolPaths.
Expand Symbol locations to see the configured paths and remove added entries without deleting their files.
Run Analyze again after changing symbols. A .dSYM must match the crashed build's UUID.
On macOS, symbol folders also load their immediate .dSYM bundles (up to 100); nested bundles need their own entry or containing folder.
On Perfetto (or crdev: Show Perfetto Traces), select a running browser launched with Remote debugging (CDP) enabled.
Choose 10, 30, or 60 seconds, or Until stopped, then click Record trace.
Expand Categories to browse, search, and select entries with checkboxes, including disabled-by-default-* categories. Before launching a browser, the list comes from the checkout's Chromium and V8 registries, or a bundled Chromium catalog if those files are unavailable.
Connecting a browser loads the list reported by that build. Discovered categories are saved for offline use, and the panel labels the current list's source. Refresh categories reloads the browser list or offline registries. Custom names and wildcard patterns remain available through the comma-separated field. Clearing the selection requires choosing at least one category before recording.
If the browser's category lookup times out or returns no registered categories during startup, the current catalog stays available with a warning and Retry. Turn off Selected only to browse the whole catalog.
Stop & save finishes early; timed recordings also finish when the panel is hidden. Recording covers the browser and its child processes with a 64 MB rolling buffer.
For representative timings, keep the browser and renderers running rather than paused at breakpoints.
Recordings are saved as .pftrace files in VS Code's workspace storage. The recent list remembers up to 20 traces for this workspace; Save as exports a copy and Reveal shows the file.
Use Import trace… to load an existing Perfetto or Chrome JSON trace. Open in Perfetto opens the timeline in a VS Code editor beside your code. Perfetto loads from ui.perfetto.dev and processes the trace locally without uploading it; approve its Open trace prompt if shown.
In browser provides the external-browser alternative through a local handoff page. If the browser blocks the popup, click the handoff page's button.
Files up to 512 MB are supported. Larger files can be opened directly in Perfetto. Closing the VS Code window during a recording cancels it; stop and save first.
Network
Open Network (or crdev: Show Network), select a browser started with Remote debugging enabled, and click Record. Both Debug and Run work. Whole browser (NetLog) records the browser network stack, including internal services, URL requests, DNS, proxy, connections, and sockets, without pausing renderers or using Perfetto recording.
Recording opens Chromium's native Save dialog. Choose a log destination in the browser; the panel then reads that file live. No browser restart is needed. Chromium flushes queued events in batches of 15, so the final few events may wait until more traffic arrives or you click Stop. Stop flushes the final batch. Browser NetLog returns to the same recorder page. Close any existing native net-export page before starting a new capture; the extension never takes over another recording.
Capture response bodies is enabled by default. Chromium writes credentials and raw payload bytes into the chosen file in this mode. The panel decodes textual responses as strings and formats valid JSON. Binary responses remain base64. Choose an individual URL_REQUEST source and open Response body; HTTP/2 sessions and sockets can carry many requests and do not have one response body. Partial, unavailable, compressed-only, and truncated previews are identified explicitly. Response previews are limited to 256 KiB each and 4 MiB total.
Request body shows available upload payloads. Chromium's native NetLog records upload counts rather than upload payload bytes, so browser-internal request bodies cannot be recovered from it. Page and worker uploads can be inspected using Web content (live CDP). Complete arbitrary browser-internal upload capture requires browser instrumentation or a proxy.
Browse every recorded NetLog source type, filter by URL/text, type, or failure, and inspect headers and event parameters. The preview retains 500 sources with the latest 64 events per source; lists use pages of 100. Export JSON opens the retained preview in an editor. Save full capture… copies the complete native NetLog file, including events omitted from the preview. The native file belongs to you and is never deleted when the preview is cleared, replaced, or closed. Recording uses unbounded NDJSON logging, so stop it when finished. Cancel stops only a recording the extension can still verify as its own; if another net-export page or recording intervenes, stop logging manually in the browser.
Web content (live CDP) provides live page, iframe, and worker requests, query parameters, request payloads, response bodies, timing, and WebSocket messages. This scope excludes browser-internal traffic. Start before reloading the page; prior traffic is not replayed. Response bodies load on demand and may expire from the browser buffer. Pause stops adding requests while retained requests and WebSockets can keep updating. Disconnect releases the owned connection. DevTools attachment can affect worker lifetime and timing.
UMA and UKM
Open UMA/UKM (or crdev: Show UMA/UKM) and select a browser with Remote debugging enabled.
Browse the UMA catalog or search any part of a name. It combines all histogram names reported by the selected browser with declarations discovered in the checkout, including custom and fork-specific registries. No histogram list is hardcoded. Refresh reloads both sources; All, Recorded, and Declared filters and pagination keep the complete list browsable.
Use Watch beside a name, or enter an exact name manually, to follow its live bucket distribution with sample counts and percentages. Enum histograms show labels as Name (index), read from the checkout's enum XML; numeric histograms retain bucket ranges, mean, and sum. Declared enum values with no samples appear with zero counts. Declared histograms may not have samples in the current browser yet. Existing UMA watches migrate from Watch automatically with their intervals and paused state.
Use Refresh UKM to read the browser's current UKM events, sources, and metric values, then search the snapshot by event, URL, or metric. Refresh reads the same data as chrome://ukm through a temporary hidden target; it does not enable recording or change consent. UKM can be disabled or empty in your build. Snapshots stay in memory and are cleared when switching browsers.
If Chromium blocks internal debug pages, enable them at chrome://chrome-urls and refresh UKM again. This makes the diagnostic page available; it does not enable UKM recording.
Watch continues to provide JavaScript expressions and page performance metrics such as heap size and DOM node counts.
Releasing
The Release workflow uses the same flow as better-review: type-check and unit-test,
build a universal VSIX, retain the VSIX and its SHA-256 checksum as workflow artifacts, create a GitHub release,
then publish the same package on the VS Code Marketplace as cgqaq.crdev.
- Update
version in package.json and package-lock.json and add a ## [x.y.z] section to CHANGELOG.md.
- Preview the notes with
npm run --silent release:notes -- x.y.z and push the version changes.
- Push the matching
vX.Y.Z tag. For the initial version, use v0.1.0.
The tag must match the package version. Versions with a hyphen, such as 0.1.0-beta.1, become GitHub prereleases
and skip Marketplace publishing. Release notes come from the matching changelog section, preserving Markdown
formatting and joining wrapped paragraph lines; a missing section uses GitHub's generated notes. Rerunning a
release skips GitHub releases and Marketplace versions that already exist.
Run the workflow from the Actions tab with dry_run enabled (the default) to run checks and keep the VSIX and
checksum without publishing. Disable it to release the version at the selected ref.
Marketplace publishing uses Trusted Publishing
with GitHub OIDC. In the cgqaq publisher's Trusted Publishing settings,
create a policy with repository owner CGQAQ, repository chromium-dev-toolkit, workflow release.yml, and no
environment. Run the workflow with check_publishing enabled to verify the policy; this only signs in and
publishes nothing. For a private repository, the first successful sign-in must occur within 48 hours of creating
the policy.
| |