Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>bazel-stack-vscode-ccNew to Visual Studio Code? Get it now.
bazel-stack-vscode-cc

bazel-stack-vscode-cc

StackBuild

|
13,223 installs
| (2) | Free
C/C++ Support For Bazel Stack VSCode Extension
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

bazel-stack-vscode-cc

Additional support for rules_cc in conjunction with bazel-stack-vscode

Features

Clang Compilation Database

This extension provides a command Bazel/C++: Generate Compilation Database (bsv.cc.compdb.generate) that produces a file ${workspaceDirectory}/compile_commmands.json that assists with Intellisense for Bazel/C++ repositories.

To setup, edit your workspace settings (search for bsv.cc.compdb.targets) and configure a list of bazel labels for the cc_binary or cc_library targets you'd like to be indexed. The tool will then produce a command set for the transitive closure of those top-level targets.

To configure the bazel executable and/or additional bazel build arguments, use the bsv.bazel.executable and bsv.bazel.buildFlags settings (provided by bazel-stack-vscode).

These can be added to your .vscode/settings.json and checked-in to VCS as follows:

{
    ...
    "bsv.bazel.buildFlags": [
        "--config=custom",
    ],
    "bsv.cc.compdb.targets": [
        "//app/foo:foo_binary",
        "//app/bar:bar_binary",
        "//app/baz:baz_binary",
    ]
}

Works best in conjuction with https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd.

This feature was derived from https://github.com/grailbio/bazel-compilation-database.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft