Allow custom debug adapter type in cmake.debugConfig#4818
Merged
Conversation
When `type` is specified in `cmake.debugConfig`, automatic debugger detection from the CMake cache is skipped. Instead, a minimal base configuration is built from the target (program, cwd, name) and the user's full configuration is overlaid. This enables using any debug adapter (e.g., codelldb, lldb) with arbitrary properties. The `CppDebugConfiguration` interface now accepts `type` and arbitrary additional properties. The `cmake.debugConfig` JSON schema adds `type` and `additionalProperties: true`. Fixes #4050 Co-authored-by: Omotola <8052624+Omotola@users.noreply.github.com>
Address code review feedback by destructuring program out of userConfig before overlay, preventing the fragile double-assignment pattern. Co-authored-by: Omotola <8052624+Omotola@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [Feature] Allow ability to specify custom debug launch configuration
Allow custom debug adapter type in cmake.debugConfig
Mar 14, 2026
Contributor
Omotola
approved these changes
Mar 21, 2026
Collaborator
gcampbell-msft
left a comment
There was a problem hiding this comment.
Overall I'm good with this change, just want to make sure we have clarity on some of the modifications/additions
Contributor
|
@copilot can you resolve the merge conflicts in this PR |
…-custom-debug-launch-config # Conflicts: # CHANGELOG.md # src/cmakeProject.ts
Contributor
Author
Merge conflicts resolved in
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
snehara99
approved these changes
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This change addresses item #4590
This changes visible behavior
The following changes are proposed:
typeproperty tocmake.debugConfigthat, when set, skips automatic debugger detection from the CMake cache and uses the specified debug adapter directlycmake.debugConfigviaadditionalProperties: truein the schema and an index signature onCppDebugConfigurationdebugTarget()anddebugCTest()incmakeProject.tsto branch: custom type path builds a minimal base config from the target (program,cwd,name,args), then overlays the user config; otherwise falls through to existing cache-based auto-detectionThe purpose of this change
cmake.debugConfigwas limited to a fixed set ofcppdbg/cppvsdbgproperties (MIMode,miDebuggerPath, etc.). Users wanting a different debug adapter (e.g.,codelldb,lldb) had no way to specify one — the adapter type was always auto-detected from the CMake cache.Other Notes/Information
Example — using CodeLLDB instead of the auto-detected debugger:
program,cwd,args,name, andenvironmentare still populated automatically from the CMake target. Whentypeis omitted, behavior is unchanged — the debugger is auto-detected from the cache as before.Original prompt
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.