Skip to content

Releases: microsoft/vscode-cmake-tools

1.24.42

Choose a tag to compare

@hanniavalera hanniavalera released this 11 Sep 17:29
22fc2be

Features:

  • Add support for the FASTBuild generator (CMake 4.2+). #4690
  • Add support for ${workspaceFolder}, ${workspaceFolder:name} variables and relative paths in cmake.exclude setting for multi-root workspaces. #4689
  • Add onConfigureResult event 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.preConfigureTask setting to execute a named VS Code task before every CMake configure. #2449 #4960 @erdemiru

Improvements:

  • Add ${testName} variable support for cmake.ctestArgs and cmake.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.revealLogOnAutomaticTrigger restores the old behavior. #4988
  • Add cmake.showTimestampsInOutput setting 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>_COMPILER to 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 vsInstanceVersion vendor field in CMakePresets.json so 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 vsInstanceVersion vendor field when resolving cmake.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 explicit cmake.cmakePath or preset cmakeExecutable is 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/EPERM error (and adding no kits) when the chosen folder contains a subdirectory the current user cannot read (for example a root-only /opt/rh/.../root/root on 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 cmake build/configure task (a tasks.json entry with "type": "cmake") always operating on the first CMake project in a workspace folder that hosts several projects (for example multiple cmake.sourceDirectory entries) 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 with program '${cmake.testProgram}' does not exist when 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 Code measurement (such as SEGFAULT or Timeout) while Exit Value stays 0, so the failure message now names that status instead of the misleading exit value. #5043
  • Fix the cmake version/capabilities probe, configure, build, and CMake script debugger intermittently failing (for example No version is set for shim: cmake) for users whose cmake comes 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 on PATH resolves the correct cmake for the project regardless of how the editor was launched. #5005 @danieleformichelli
  • Fix the auto-detected source directory notification showing a literal Change\u2026 on its button instead of Change... in packaged (Marketplace) builds. The label used a \u2026 JavaScript unicode escape, which vscode-nls-dev extracted 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...
Read more

1.23.52

Choose a tag to compare

@hanniavalera hanniavalera released this 22 Apr 21:24

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.json parsing so that escaped quotes (e.g., \") are correctly interpreted when compiling single files. #4896
  • Fix cmake.exportCompileCommandsFile set to false still passing -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=FALSE instead of omitting the flag entirely, which caused CMake warnings for projects with LANGUAGES 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

Choose a tag to compare

@hanniavalera hanniavalera released this 16 Apr 00:45
536a24a

Features:

  • Add support for CMake Presets version 11 (added in CMake 4.3). In test presets, the execution.jobs field can now be an empty string, equivalent to passing --parallel with no value.
  • Automatically add new source files to CMakeLists.txt and remove deleted source files from CMakeLists.txt. Two new commands (cmake.addFileToCMakeLists and cmake.removeFileFromCMakeLists) and nine new cmake.modifyLists.* settings provide full control over target selection, variable handling, and confirmation behavior. #2132 #4454 @malsyned
  • Add cmake.languageServerOnlyMode to 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.debugConfig via the type property. 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 CTest ENVIRONMENT test 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.shell setting 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.postConfigureTask setting 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.setBuildTargetSameAsLaunchTarget setting to automatically set the build target when the launch/debug target is changed. #4519 @nikita-karatun
  • Add cmake.additionalBuildProblemMatchers setting to define custom problem matchers for build output. Supports tools like clang-tidy, PCLint Plus, cppcheck, or custom scripts integrated via add_custom_command/add_custom_target. #4077
  • Support targetName argument 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 intelliSenseMode validation in CMake Presets. #4815 @halflifefan
  • Support string arrays in kit cmakeSettings to pass CMake lists without escaping semicolons (e.g., "LLVM_ENABLE_PROJECTS": ["clang", "lld"]). #4503
  • Add cmake.outlineViewType setting 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.visualStudioArguments property, this is the extra arguments that would be passed to the vcvarsall.bat file 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.json vs generic VS Code tasks.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.allowParallelJobs is disabled. #4829
  • Document how to configure cmake.debugConfig.visualizerFile to use custom Natvis files with quick debugging, without requiring a launch.json. #4616
  • Add .github/copilot-instructions.md to 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.useCMakePresets is set to auto, 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.environment and cmake.configureEnvironment when expanding $penv{} macros in CMake Presets include paths. #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 cmake to diagnostics that this extension contributes to the Problems Pane. PR #4766
  • Set the VSCODE_CMAKE_TOOLS environment variable for all spawned subprocesses so that CMakeLists.txt can detect when CMake is run from VS Code. #4233
  • Ensure kit environmentVariables expansions (for example, ${env:PATH} or ${env.PATH}) use the environment produced by environmentSetupScript, so script-updated values are preserved during expansion. #4091
  • Honor debugger.workingDirectory from the CMake File API when debugging a target, so that the DEBUGGER_WORKING_DIRECTORY target property is used as the debugger working directory. #4595
  • Honor the active kit environment (including environmentSetupScript and kit-defin...
Read more

1.22.28

Choose a tag to compare

@hanniavalera hanniavalera released this 18 Feb 20:14
b904597

Improvements:

  • Updated extension dependencies (ms-vscode.cpp-devtools)

1.22.27

Choose a tag to compare

@hanniavalera hanniavalera released this 09 Feb 22:27

Bug Fixes:

Fix infinite presets reloading loop when preset files are symlinks or include symlinked files. #4668
Reapplying "Refactor and improve colorization language services support" #4697

1.22.26

Choose a tag to compare

@hanniavalera hanniavalera released this 26 Jan 23:20
8d70158

Features:

Improvements:

  • In the Test Explorer, associate CTest tests with outermost function or macro invocation that calls add_test() instead of with the add_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 UTILITY has source files. #4404

1.21.36

Choose a tag to compare

@gcampbell-msft gcampbell-msft released this 10 Jul 12:16
015abf5

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.exclude setting 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.json and tasks.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 Task lists 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

Choose a tag to compare

@gcampbell-msft gcampbell-msft released this 04 Mar 14:34
c24739c

1.20.53

Improvements:

  • Add notification suggesting users to uninstall twxs.cmake now that we have built-in Language Services. #4288

Bug Fixes:

  • Fix regression where we weren't properly expanding copyCompileCommands path. #4294

1.20.52

Choose a tag to compare

@gcampbell-msft gcampbell-msft released this 18 Feb 20:52
fad04c8

1.20

Features:

  • Add support for Presets v9, which enables more macro expansion for the include field. #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 the ctest
    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.spawn work, 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.buildBeforeRun is set to false. #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 isUserPreset for presets, only set it to true if 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.copyCompileCommands that 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

1.19.52

Choose a tag to compare

@gcampbell-msft gcampbell-msft released this 30 Sep 10:52
21fa776

1.19.52

Improvements:

  • Update signing to support VSCode extension signing. #4055