# CMake Tools for VS Code: CMake Presets, Builds, Tests, and Debugging

> CMake Tools is a VS Code extension for C and C++ projects built with CMake. It integrates presets, IntelliSense, CMake script debugging, tasks, and CTest with the editor, but it still depends on a CMake executable that the developer must install and locate.

**microsoft/vscode-cmake-tools** — CMake Tools provides a robust, convenient workflow for CMake projects in VS Code. It simplifies configurations with CMake presets, supports IntelliSense and built-in debugging for CMake scripts, and offers configurable tasks. Its customizable interface allows for efficient project control, while also simplifying test execution and monitoring.

- Repository: https://github.com/microsoft/vscode-cmake-tools
- Website: https://aka.ms/vscode-cmake-tools
- Stars: 1,686 · Forks: 555
- Language: TypeScript
- License: MIT
- Published: 2026-10-16 · Updated: 2026-10-16 · Language: en
- Canonical page: https://hysenlabs.com/projects/microsoft-vscode-cmake-tools

## Why CMake Tools belongs in a VS Code CMake Workflow

CMake Tools targets developers who edit C or C++ projects whose configuration, build, and test operations are driven by CMake. Without editor integration, those operations often require separate terminal commands, hand-maintained launch configurations, and separate test reporting. The extension places those activities inside VS Code while retaining CMake as the project system.

Its intended scope is broader than syntax support for CMake files. The README lists support for CMake presets, rich IntelliSense, a built-in debugger for CMake scripts, configurable CMake tasks, project status, a project outline, commands, and CTest integration. This combination is useful for a project that changes configure presets, builds selected targets, launches generated programs, and monitors tests during development.

The dependency boundary matters. CMake Tools does not make CMake, a compiler, or a native debugger part of the VS Code application. The README explicitly requires CMake to be available on the system. The extension can organize and expose CMake behavior, but the underlying CMake executable remains responsible for the configure, generation, and build operations it supports.

## Presets, Commands, and Project State in CMake Tools

CMake presets are a central part of the documented workflow. The README shows preset support as a feature and names configure, build, test, package, and workflow preset state through the repository package metadata. That naming indicates that the extension tracks several preset categories rather than treating a project as having one fixed CMake invocation.

The extension also exposes project context through commands such as `cmake.activeFolderName`, `cmake.activeFolderPath`, `cmake.activeConfigurePresetName`, `cmake.activeBuildPresetName`, and `cmake.activeTestPresetName`. These identifiers are visible in `package.json` as activation events. They are not a user-facing installation command, but they do show how the extension binds editor actions to the active folder and its selected presets.

The README does not document the complete synchronization algorithm, cache refresh policy, or preset validation rules. It therefore does not justify claims about detecting every change immediately or handling malformed presets in a particular way. Teams should treat preset selection and configuration as project-defined CMake behavior. The editor presents the state and runs the actions, while CMake remains the authority for whether a preset is accepted.

## Building, Testing, and Debugging Through the Extension

CMake Tools connects three related workflows. The build workflow selects a configured target and invokes the corresponding CMake operation. The test workflow uses CTest integration for test execution and monitoring. The debugging workflow supports CMake scripts through the built-in debugger, while the package metadata also identifies debugger-related activation events for `cmake` resolution and dynamic configurations.

For native program debugging, the extension does not claim that a compiler, executable, or debugger configuration is automatically complete. The README points to CMake as the project configuration tool, but it does not document a universal launch configuration or guarantee that every compiler and platform combination will debug without additional setup. The generated target, platform toolchain, and VS Code debugger requirements still need to be understood by the project owner.

This separation is a design trade-off. A focused CMake CLI setup can be easier to script in continuous integration because it has fewer editor layers. CMake Tools is aimed at interactive development, where selecting a preset, building a target, launching a result, and viewing CTest results from one editor reduces repeated context switching. The extension's value is greatest when those actions are part of a developer's normal edit and test loop.

## Installing CMake Tools Without Hiding the Toolchain

The README gives an installation path but does not publish a shell command for installing the extension or a complete command sequence for a first project. It directs users to install CMake from the CMake website or use the CMake bundled with a Visual Studio installation, then install CMake Tools from the VS Code Extensions pane or the VS Code Marketplace.

After installation, CMake must be discoverable either through `PATH` or through the `cmake.cmakePath` setting. The README does not specify a default executable path, a bundled version, or a configuration snippet that can be copied safely across machines. For that reason, no invented install command or hard-coded path is included here. The first configuration step should be either to place the intended CMake executable on `PATH` or to point `cmake.cmakePath` at that executable.

The repository metadata states that the extension package requires VS Code `^1.88.0`. The repository metadata gives the package name as `cmake-tools` and the publisher as `ms-vscode`. These details make the installation boundary concrete: the extension has a VS Code host requirement, while CMake itself is an external program selected by the developer.

## CMake Tools Compared with Direct CMake Commands

The clearest alternative is to use CMake directly from a terminal and connect the results to VS Code through separate tooling. Direct CMake usage keeps the command line as the interface: the developer runs CMake and CTest commands, reads their output in the terminal, and manages debugging configuration separately. That approach works well for small scripts, CI jobs, reproducible command sequences, or environments where the editor is only a text viewer.

CMake Tools takes a different approach. It adds VS Code commands, preset selection, IntelliSense, task definitions, a project outline, status information, CTest monitoring, and CMake script debugging. It is therefore more suitable when the editor is the primary development surface and the project uses several CMake operations. The direct CLI remains more transparent for automation because there is no extension state between the script and CMake.

Neither approach removes the need to define the project correctly. CMake presets, toolchain files, compiler selection, and test registration are still part of the project's CMake configuration. The choice is primarily about interface and editor integration, not about replacing CMake's build model.

## Telemetry, Licensing, and Upgrade Boundaries

The extension is licensed under the MIT license, according to both the repository description and `package.json`. The README also states that the extension collects usage data and sends it to Microsoft. Collection is controlled through Visual Studio Code's `telemetry.enableTelemetry` setting. That setting is a project-specific operational choice for users whose organization restricts telemetry or requires explicit consent.

The repository is not archived. The last push was on 2026-10-16, and the listed recent releases include `v1.24.42` on 2026-09-11, `v1.23.52` on 2026-04-22, and `v1.23.51` on 2026-04-16. Those dates establish recent repository activity, but the README does not provide a compatibility matrix for every CMake version, compiler, operating system, or debugger. Upgrade planning should therefore include reading the release notes and checking whether the project's CMake presets and toolchain assumptions remain supported.

The extension also depends on VS Code itself. Its `engines.vscode` value is `^1.88.0`, so an older VS Code installation cannot simply assume compatibility with the current package. The README does not document an automatic migration for project settings, so teams should preserve their CMake files, presets, and editor configuration before upgrading.

## Choosing CMake Tools for the Project's Actual Workflow

CMake Tools is appropriate when the project is already CMake-based, developers work primarily in VS Code, and the team wants preset selection, IntelliSense, build targets, CTest results, and debugging close to the source files. It is particularly relevant for projects that use CMake presets because the extension explicitly supports that configuration model and exposes preset-related commands.

It is not the right tool for a project that does not use CMake, or for a team that wants a fully self-contained editor toolchain. The README requires an installed CMake executable and does not claim to provide compiler discovery, platform-specific debugger installation, or a complete replacement for native build configuration. A direct CMake command workflow may also be preferable when reproducible terminal commands matter more than editor convenience.

The first verification should be concrete: install the extension, make the intended CMake executable discoverable through `PATH` or `cmake.cmakePath`, confirm VS Code meets the `^1.88.0` engine requirement, and exercise the project's configure, build, test, and debug paths. If those operations work with the project's existing CMake configuration, the extension supplies a coherent VS Code workflow around them.

## Conclusion

CMake Tools is a practical choice for developers who want CMake configuration, build targets, tests, and debugging inside VS Code, especially projects that use CMakePresets.json. It is a poor fit when a team wants no dependency on an external CMake installation or expects the extension to replace every part of a native C++ toolchain. Check the required VS Code version, compiler and debugger setup, preset compatibility, telemetry policy, and upgrade notes before adoption. For an existing Visual Studio installation, first confirm whether the bundled CMake executable can be used through PATH or cmake.cmakePath.

## FAQ

### Does CMake Tools include CMake itself?

No. The README requires CMake to be available on the system, either through a downloaded installation or the CMake bundled with Visual Studio. The executable must be on `PATH` or selected with the `cmake.cmakePath` setting.

### How do I install CMake Tools in VS Code?

The README says to install it from the VS Code Extensions pane or the VS Code Marketplace. It does not provide a shell command for the extension installation.

### What does CMake Tools support for CMake projects?

The documented features include CMake presets, IntelliSense, CMake script debugging, configurable CMake tasks, project status, a project outline, commands, and CTest integration. The README does not claim that these features remove the need for a compiler or platform debugger.

### Does CMake Tools collect usage data?

Yes. The README states that the extension collects usage data and sends it to Microsoft. Collection is controlled by Visual Studio Code's `telemetry.enableTelemetry` setting.

## Sources

- [License: MIT](https://github.com/microsoft/vscode-cmake-tools/blob/main/LICENSE)
- [microsoft/vscode-cmake-tools on GitHub](https://github.com/microsoft/vscode-cmake-tools)
- [Project website](https://aka.ms/vscode-cmake-tools)
- [README](https://github.com/microsoft/vscode-cmake-tools/blob/main/README.md)
- [Releases](https://github.com/microsoft/vscode-cmake-tools/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/microsoft-vscode-cmake-tools
