Repository navigation
Releases: microsoft/vscode-cmake-tools
Releases · microsoft/vscode-cmake-tools
Release list
1.24.42
Features:
- Add support for the FASTBuild generator (CMake 4.2+). #4690
- Add support for
${workspaceFolder},${workspaceFolder:name}variables and relative paths incmake.excludesetting for multi-root workspaces. #4689 - Add
onConfigureResultevent to the CMake Tools API that fires after every configure attempt (success or failure), allowing dependent extensions to detect and react to configure failures. #4021 - Add
cmake.preConfigureTasksetting to execute a named VS Code task before every CMake configure. #2449 #4960 @erdemiru
Improvements:
- Add
${testName}variable support forcmake.ctestArgsandcmake.ctestDefaultArgs, enabling per-test argument expansion (e.g., unique log file paths per test). #4416 - Stop the CMake output channel from taking over the panel (hiding the terminal you're working in) during automatic configures (e.g. configure-on-open and automatic reconfigure) and programmatic builds or tests invoked through the CMake Tools API (e.g. by Copilot via the C/C++ DevTools companion). Failures are still always shown, explicit user-initiated builds/configures are unchanged, and
cmake.revealLogOnAutomaticTriggerrestores the old behavior. #4988 - Add
cmake.showTimestampsInOutputsetting to display timestamps and log levels in the CMake output channel, useful for tracking build durations. #4057 - When CMake is invoked prior to running tests, build targets required for the test rather than everything. #4515 @epistax
- Allow building object library targets from the project outline. #4797
- Add inline "Run" and "Debug" CodeLens buttons in source editors for tests discovered by CTest, allowing tests to be executed directly from their source locations. #4451
- Improve responsiveness to CMake path changes made by vendor extensions during configure-on-open retry. #4908 Contributed by STMicroelectronics
- Improve ergonomics of the test explorer UI by removing the project source directory, improving horizontal scrolling experience. #4562 @miss-programgamer
- Pass mandatory compiler arguments from
CMAKE_<LANG>_COMPILERto cpptools so it can properly determine system include paths and built-in preprocessor macro definitions. Requires CMake 4.3 or newer. #4627 @cwalther - Add support for a
vsInstanceVersionvendor field inCMakePresets.jsonso Ninja configure presets can target a specific installed Visual Studio instance (by version) when bootstrapping the developer environment, instead of always using the latest. #4698 - Use the CMake bundled with the Visual Studio instance selected by the
vsInstanceVersionvendor field when resolvingcmake.exe, instead of always falling back to the latest installed Visual Studio's CMake. Only applies on Windows for presets that pin an instance and when no explicitcmake.cmakePathor presetcmakeExecutableis set; otherwise CMake resolution is unchanged. #5052 - Make the CMake Cache Editor ("Edit Cache (UI)") aware of cache variables defined by the active CMake configure preset: a new "Source" column shows where each variable comes from (project/user preset vs. the CMake cache) and whether it still matches the preset, and edits to preset-backed variables are now persisted as an override in
CMakeUserPresets.json(and reconfigured with it) instead of being silently reverted by the preset on the next configure. #4884 @BilboBeutlin89 - Load the bundled language-service data (command, variable, module, and policy descriptions) on first hover/completion instead of during activation, so activation no longer blocks on reading those assets. #5035
- Replace the datalist/input control with a select control for enum-valued cache entries in the CMake Cache Editor, so allowed values are chosen from a proper dropdown instead of a free-text field. #4973
Bug Fixes:
- Fix "Scan recursively for kits in specific directories" aborting with an unhandled
EACCES/EPERMerror (and adding no kits) when the chosen folder contains a subdirectory the current user cannot read (for example a root-only/opt/rh/.../root/rooton a WSL/Linux host). Unreadable directories and un-stat-able entries are now skipped so the rest of the scan still completes. #5020 - Fix the last compiler diagnostic of an IAR build being dropped from the Problems panel. The IAR output parser only emitted a diagnostic once a following line arrived, so the final one of each build (with no trailing line) was never flushed; parsers are now flushed when the build output ends. #5030
- Fix a
cmakebuild/configure task (atasks.jsonentry with"type": "cmake") always operating on the first CMake project in a workspace folder that hosts several projects (for example multiplecmake.sourceDirectoryentries) instead of the selected active folder. Such a task now honors the active project when it belongs to the task's workspace folder, and only falls back to the folder's project otherwise. #4512 - Fix launch configurations that use
${cmake.testProgram}(and the related${cmake.testArgs},${cmake.testWorkingDirectory}and${cmake.testEnvironment}placeholders) failing withprogram '${cmake.testProgram}' does not existwhen started from the Run and Debug view (F5) instead of the Test Explorer. Such a launch now prompts you to pick one of the discovered CTest tests and resolves the placeholders for it, so the same configuration works from both entry points. #4574 - Fix disabled tests (for example GoogleTest
DISABLED_tests, which CTest reports as "Not Run (Disabled)") being shown in the Test Explorer as failed ("failed with completion status 'Disabled'") and dragging their group's status down. Such tests are intentionally not executed, so they are now reported as skipped and no longer taint the run result. #4267 - Fix CMake syntax highlighting treating escaped
$<sequences in quoted regex strings as generator expressions. #5028 - Fix the Test Explorer reporting a test that crashed or timed out (for example one killed by a segmentation fault) as "failed with exit code 0". CTest records the cause in its
Exit Codemeasurement (such asSEGFAULTorTimeout) whileExit Valuestays 0, so the failure message now names that status instead of the misleading exit value. #5043 - Fix the
cmakeversion/capabilities probe, configure, build, and CMake script debugger intermittently failing (for exampleNo version is set for shim: cmake) for users whosecmakecomes from a directory-based version manager (mise, asdf, vfox, âĶ). These CMake subprocesses now run in the project directory instead of inheriting the extension host's working directory, so the version-manager shim onPATHresolves the correctcmakefor the project regardless of how the editor was launched. #5005 @danieleformichelli - Fix the auto-detected source directory notification showing a literal
Change\u2026on its button instead ofChange...in packaged (Marketplace) builds. The label used a\u2026JavaScript unicode escape, whichvscode-nls-devextracted verbatim into the localization bundle; it now uses plain.... #5003 - Fix a test run that matched no tests being reported as success. When specific tests are requested (e.g. programmatically via the API/Copilot) but none match a discovered test â for example an agent passing a partial or non-existent test name â CTest exits 0 ("No tests were found!!!"), which callers could misread as "all tests passed". Such runs now return a failure with a clear message when tests exist but the requested ones weren't found. #4915
- Stop showing "Adding a file without a valid code model" / "Deleting a file without a valid code model" warning notifications when a source file is automatically added or deleted and there is no valid CMake code model (for example when using clangd with the C/C++ IntelliSense engine disabled, or before the project has been configured). The automatic list-file update now stays silent in this case; the warning is only shown when the...
1.23.52
Bug Fixes:
- Fix "Compile File" terminal closing immediately, hiding compilation output. The terminal now stays open until the user presses a key + Fix POSIX shell escape handling in
compile_commands.jsonparsing so that escaped quotes (e.g.,\") are correctly interpreted when compiling single files. #4896 - Fix
cmake.exportCompileCommandsFileset tofalsestill passing-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=FALSEinstead of omitting the flag entirely, which caused CMake warnings for projects withLANGUAGES NONE. #4893 - Fix regression where Visual Studio kits with an existing Ninja-based build cache would fail due to a generator mismatch. Ninja is now preferred again when available, stale VS kits derive the correct generator at runtime as a fallback, and the build directory is auto-cleaned on generator mismatches. #4890
1.23.51
Features:
- Add support for CMake Presets version 11 (added in CMake 4.3). In test presets, the
execution.jobsfield can now be an empty string, equivalent to passing--parallelwith no value. - Automatically add new source files to
CMakeLists.txtand remove deleted source files fromCMakeLists.txt. Two new commands (cmake.addFileToCMakeListsandcmake.removeFileFromCMakeLists) and nine newcmake.modifyLists.*settings provide full control over target selection, variable handling, and confirmation behavior. #2132 #4454 @malsyned - Add
cmake.languageServerOnlyModeto keep CMake language services active while disabling CMake project integration when no local CMake executable is available. #4516 - Allow specifying a custom debug adapter type in
cmake.debugConfigvia thetypeproperty. When set, automatic debugger detection is skipped and any debug adapter (e.g.,codelldb,lldb) can be used with arbitrary configuration properties. #4818 - Add
${cmake.testEnvironment}placeholder for launch.json that resolves to the CTestENVIRONMENTtest property, and automatically include CTest environment variables when debugging tests without a launch configuration. #4572 #4821 - Add "Delete Build Directory and Reconfigure" command that removes the entire build directory before reconfiguring, ensuring a completely clean state. #4826
- Add
cmake.shellsetting to route CMake/CTest/CPack subprocess invocations through a custom shell (e.g., Git Bash, MSYS2), enabling embedded toolchains that require POSIX path translation on Windows. #1750 - triple: Add riscv32be riscv64be support. #4648 @lygstate
- Add command to clear build diagnostics from the Problems pane. #4691
- Clear build diagnostics from the Problems pane when a new build starts and populate them incrementally during the build. #4608
- Add individual CTest test nodes to the Project Outline with inline run/debug buttons, and enable debugging tests from both the Outline and Test Explorer without requiring a launch.json. #4721
- Add "Delete Cache, Reconfigure and Build" command that chains cache deletion, reconfiguration, and build into a single action. #4723
- Add
cmake.postConfigureTasksetting to execute a named VS Code task after every successful CMake configure. #4566 @Francois-Le - Add "Set Build and Launch/Debug Target" command that sets both the build target and launch target simultaneously. #4732
- Add
cmake.setBuildTargetSameAsLaunchTargetsetting to automatically set the build target when the launch/debug target is changed. #4519 @nikita-karatun - Add
cmake.additionalBuildProblemMatcherssetting to define custom problem matchers for build output. Supports tools like clang-tidy, PCLint Plus, cppcheck, or custom scripts integrated viaadd_custom_command/add_custom_target. #4077 - Support
targetNameargument for launch-target command substitutions (cmake.launchTargetPath, etc.) via${input:...}variables, enabling build-before-run for non-active executable targets without changing the active launch target. #4656 - Complete Bookmarks context menu with "Set Build Target", "Set Launch/Debug Target", "Open CMakeLists.txt", and "Run Utility Target" actions to match the Project Outline. #4788
- Relax
intelliSenseModevalidation in CMake Presets. #4815 @halflifefan - Support string arrays in kit
cmakeSettingsto pass CMake lists without escaping semicolons (e.g.,"LLVM_ENABLE_PROJECTS": ["clang", "lld"]). #4503 - Add
cmake.outlineViewTypesetting to toggle the Project Outline between a flat list view and the prior hierarchical tree view that shows each CMake project separately. #3799 #4538 @ar1m4n - Add
kit.visualStudioArgumentsproperty, this is the extra arguments that would be passed to thevcvarsall.batfile when entering the VS dev environment, those arguments are[platform_type] [winsdk_version] [-vcvars_ver=vc_version] [-vcvars_spectre_libs=spectre_mode]. #125 #4538 @lygstate
Improvements:
- Clarify variable substitution scope in docs for
settings.jsonvs generic VS Codetasks.json/launch.json, including when to use${command:cmake.*}and why${buildKit},${generator}, and${config:cmake.configureArgs}may not expand as expected in tasks. #4010 - Improve CMake syntax highlighting: extend variable recognition with compiler/toolchain families and add scoped property command colorization for
set_property,get_property,set_target_properties, and related commands. #4527 @pboettch - Run tests sequentially in alphabetical order (matching the Test Explorer display order) when
cmake.ctest.allowParallelJobsis disabled. #4829 - Document how to configure
cmake.debugConfig.visualizerFileto use custom Natvis files with quick debugging, without requiring alaunch.json. #4616 - Add
.github/copilot-instructions.mdto ground GitHub Copilot in the repo's architecture and coding conventions. - Clicking on a CTest in the Project Outline now navigates to the test source file, matching the existing Test Explorer behavior. #4773
- Clicking on a CTest unit test in the Test Explorer now navigates to the test source file by matching the test executable to its CMake target's source files. #4449
- Make "CMake: Add ... Preset" commands available in the command palette when
cmake.useCMakePresetsis set toauto, even before a CMakePresets.json file exists. #4401 - Improve CMake syntax highlighting with command-scoped keyword rules, expanded variable recognition, and better generator-expression support. Remove obsolete deprecated-keyword entries that caused false positives on user-defined names. #4709 #4508 #4613
- Add MSVC linker error problem matching to the Problems pane. #4675 @bradphelan
- Use environment variables from
cmake.environmentandcmake.configureEnvironmentwhen expanding$penv{}macros in CMake Presetsincludepaths. #3578 - Allow preset modification commands to target CMakeUserPresets.json. The target file is determined by the focused editor, or by prompting the user when both files exist. #4564
- Display info tooltip when hovering over CMake policy identifiers (e.g.,
CMP0177), showing the CMake version that introduced the policy, a short description, and a link to the official documentation. #4544 - Append
cmaketo diagnostics that this extension contributes to the Problems Pane. PR #4766 - Set the
VSCODE_CMAKE_TOOLSenvironment variable for all spawned subprocesses so thatCMakeLists.txtcan detect when CMake is run from VS Code. #4233 - Ensure kit
environmentVariablesexpansions (for example,${env:PATH}or${env.PATH}) use the environment produced byenvironmentSetupScript, so script-updated values are preserved during expansion. #4091 - Honor
debugger.workingDirectoryfrom the CMake File API when debugging a target, so that theDEBUGGER_WORKING_DIRECTORYtarget property is used as the debugger working directory. #4595 - Honor the active kit environment (including
environmentSetupScriptand kit-defin...
1.22.28
Improvements:
- Updated extension dependencies (
ms-vscode.cpp-devtools)
1.22.27
1.22.26
Features:
- Add bookmarks and filtering of outline view. #4539 @bradphelan
- Add pre-fill project name using current folder name #4533 @HO-COOH
- Add API v5 which adds presets api. #4510 @OrkunTokdemir
- Add an option to extract details about failing tests from CTest output using regular expressions. #4420
- Add output parser for include-what-you-use. PR #4548 @malsyned
- Add better return information in the API. PR #4518
Improvements:
- In the Test Explorer, associate CTest tests with outermost function or macro invocation that calls
add_test()instead of with theadd_test()call itself. #4490 @malsyned - Better support of cmake v4.1 and its error index files in cmake-file-api replies #4575 Contributed by STMicroelectronics
- Added support for clang-cl vendor detection:
${buildKitVendor},${buildKitVersionMajor}, etc. now expand correctly when using clang-cl on Windows #4524 @wchou158
Bug Fixes:
- Fix Compiler Warnings not shown in Problems Window [#4567]#4567
- Fix bug in which clicking "Run Test" for filtered tests executed all tests instead #4501 @hippo91
- Migrate macOS CI from deprecated macOS-13 to macOS-15 Image #4633
- Ensure Visual Studio developer environment propagation preserves
VCPKG_ROOT, enabling vcpkg-dependent configure runs after using the Set Visual Studio Developer Environment command. microsoft/vscode-cpptools#14083 - Fix auto-focusing the "Search" input field in the CMake Cache view. #4552 @simhof-basyskom
- Remove the demangling feature in the code coverage implementation for now since it doesn't work properly. PR #4658
- Fix incorrect IntelliSense configuration when a
UTILITYhas source files. #4404
1.21.36
Features:
- Add an option to specify the launch target for debugging CTest tests. #4273
- Add a setting to enable/disable our built-in language services. #4290
- Add an option to group the default build target dropdown using CMake groups #3953 @itzandroidtab
- Add
cmake.excludesetting that allows users to set folders that they want the CMake Tools extension to ignore. #4112 - Add a command to substitute CMake Cache variables in
launch.jsonandtasks.json. #4422 - Add support for presets v10. #4459, #4445
Improvements:
- Add name de-mangling for C++ symbols in the Test Explorer view when running tests with coverage. #4340 @rjaegers
- No longer convert paths on lowercase on MacOS to enable cpp tools to resolve them. #4325 @tringenbach
- Speedup & reduce heap allocations in shlex split module function. Significant gains for mid-large compile_commands.json - CompilationDatabase construction. #4458 @borjamunozf
Bug Fixes:
- Fix bug that makes
Configure Tasklists only first folder in workspace. #3232 - Fix displaying "Go to Test" in the Test Explorer when the DEF_SOURCE_LINE property is set, but there is no backtrace information present. #4321 @rjaegers
- Fix gnuld error parsing false positive on make errors, false negative due to trailing \r, and false parsing of new "multiple definitions" error #2864 @0xemgy
- Fixes for small bug string bugs. #4319, #4317, #4312
- Fixes localization for "workspace is" string. #4374
- Make tooltips for selecting Launch/Debug Target. #4373
- Fix bug where unrelated symlinks are read as variant files #4304 @vitorramos.
- Fix evaluation of conditions in presets. #4425
- Fix ENOENT error at vscode startup on some circumstances #2855 Contributed by STMicroelectronics
- Fix repeat execution option in test presets #4443
- Fix bug that makes some build hang #4424 and #4465
- Fix issue with switching to presets during Quick Start. #4409
- Fix bug that shows empty lines in Pinned Commands view. #4406
1.20.53
1.20.52
1.20
Features:
- Add support for Presets v9, which enables more macro expansion for the
includefield. #3946 - Add support to configure default folder in workspace setting. #1078
- Add support to configure default folder in workspace setting. #1078 @sanore
- Add support for processing LCOV based coverage info files when tests are
executed. This adds test execution type, "Run with coverage", on thectest
section of the Testing tab.
#4040 - Add basic CMake language services: quick hover and completions for CMake built-ins. PR #4204
- Add an option to scan kits from a folder. #4191 @std-microblock
Improvements:
- Add ability to pass custom target to "CMake: Build Target" command as argument. #3598 @hippo91
- Fix "Unable to resolve configuration with compilerPath" issue for Swift. #4097
- Ensure that any uses of
proc.spawnwork, especially for .bat and .cmd files, due to VS Code updating to Node 20. #4037 - Fix "Test output isn't visible when failed" and also mark skipped tests as so. #4116 @redstrate
- Ensure that stopping tests actually forces the tests to stop running. #2095
- Retire the Show Options Moved Notification #4039
- Improve the pinned commands experience by defaulting settings and using VS Code state rather than modifying user settings. #3977
- Skip project building in the CTest test explorer when
cmake.buildBeforeRunis set tofalse. #4241 @Dabsunter - Improve consistency in key bindings. #4124 @alex20230721
Bug Fixes:
- Fix issue where files don't show up in the outline if any in the group are generated. #4099
- Fix issue where setting test suite delimiter prevent execution of all tests. #4092 @hippo91
- Fix our setting of
isUserPresetfor presets, only set it totrueif it's defined in a user presets file. #4059 - Fix issue where duplicate presets are being listed in dropdown. #4104
- Ensure that we're sanitizing paths for
cmake.copyCompileCommands. #3874 - Ensure that tests are updated after a build. #4148
- Fix various GCC compiler errors and GCC linker errors not showing up in Problems View #2864 @0xemgy
- Fix reloading presets when included files are changed or renamed and updated. #3963
- Fix the usage of toolset and archiecture in presets without generator set. #4181
- Fix compilation database path comparison with the
cmake.copyCompileCommandsthat could otherwise overwrite that file. #4207 @k0zmo - Fix parsing of CMakeUserPresets.json containing configure preset that is referenced in workflow preset. #4202 @nikobockerman
- Fix auto select active project corner case. #4146 Contributed by STMicroelectronics
- Fix issue where starting a CMake Configure with CMake Debugger while there was already a configure process running left a debug session going without a way to stop it. #4230