Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>GN Ninja Build ToolsNew to Visual Studio Code? Get it now.
GN Ninja Build Tools

GN Ninja Build Tools

Vensmer Alexander

|
1 install
| (0) | Free
Configure (gn gen), browse and build GN/Ninja targets from a dedicated side bar.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

GN Ninja Build Tools

Build GN/Ninja targets directly from VS Code. Find targets across generated build directories, run builds and maintenance commands, and inspect compiler diagnostics without switching to a separate terminal workflow.

Features

  • Discover GN build directories and browse or filter their targets.
  • Build and rebuild targets, clean targets or build directories, and build the default target.
  • Keep frequently used targets in Favorites and return to recently built targets.
  • Run gn gen, inspect target descriptions and references, and view dependency graphs.
  • See GCC/Clang, MSVC, and GN diagnostics in VS Code's Problems panel.
  • Review recorded build-step durations with Build Analysis.

Requirements

  • VS Code 1.75 or later.
  • GN and Ninja installed and available on PATH, or configured with the gnPath and ninjaPath settings.
  • A GN workspace containing .gn or BUILD.gn files.

Get Started

  1. Open the root folder of your GN workspace in VS Code.
  2. Select GN Ninja in the Activity Bar and choose a build directory, or run gn gen to create one.
  3. Browse or filter targets, then build from a target's context menu or the Actions view.

The extension detects build directories by their args.gn files, including nested directories. If your build uses non-standard executable locations, set gnNinja.gnPath and gnNinja.ninjaPath in Settings.

Keyboard Shortcuts

Shortcut Action
Ctrl+Alt+B Search for and build a target
Ctrl+Alt+Shift+B Build the default target
Ctrl+Alt+G Run gn gen for the active directory

Configuration

All settings use the gnNinja.* prefix. In particular, gnPath and ninjaPath select the executables, buildDir sets the preferred build directory, and defaultTarget selects the default build target. Additional settings control build arguments, parallel jobs, and build-on-save. The optional gnNinja.useTerminal setting moves builds to the integrated terminal and disables progress reporting and Problems panel diagnostics.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft