Integrating Bazel with IDEs
This page covers how to integrate Bazel with IDEs, such as IntelliJ, Android Studio, and CLion (or build your own IDE plugin). It also includes links to installation and plugin details.
IDEs integrate with Bazel in a variety of ways, from features that allow Bazel
executions from within the IDE, to awareness of Bazel structures such as syntax
highlighting of the
IDEs and editors
IntelliJ, Android Studio and CLion
This is the open source version of the plugin used internally at Google.
- Interop with language-specific plugins. Supported languages include Java, Scala, and Python.
BUILDfiles into the IDE with semantic awareness of Bazel targets.
- Make your IDE aware of Starlark, the language used for Bazel’s
- Build, test, and execute binaries directly from the IDE
- Create configurations for debugging and running binaries.
To install, go to the IDE’s plugin browser and search for
To manually install older versions, download the zip files from JetBrains’ Plugin Repository and install the zip file from the IDE’s plugin browser:
Visual Studio Code
Official plugin for VS Code.
- Bazel Build Targets tree
- Starlark debugger for
.bzlfiles during a build (set breakpoints, step through code, inspect variables, and so on)
See also: Autocomplete for Source Code
language-bazel package on
the Atom package manager.
Lavender is an experimental project for generating Visual Studio projects that use Bazel for building.
Bazel Eclipse Feature is a set of plugins for importing Bazel packages into an Eclipse workspace as Eclipse projects.
Autocomplete for Source Code
C Language Family (C++, C, Objective-C, and Objective-C++)
hedronvision/bazel-compile-commands-extractor enables autocomplete in a wide variety of editors. It lets language servers, like clangd and other tooling, draw upon Bazel’s understanding of how
objc code will be compiled, including, e.g., how it will configure cross compilation for other platforms.
Automatically run build and test on file change
Bazel watcher is a tool for building Bazel targets when source files change.
Building your own IDE plugin
Read the IDE support blog post to learn more about the Bazel APIs to use when building an IDE plugin.