microsoft / microsoft/vscode-cpptools

Add Launch Configuration Defaults for C/C++ debugger (similar to CodeLLDB)

Open
#14,127 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

debugger help wanted
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Feature Request

CodeLLDB supports Launch Configuration Defaults at multiple levels (user, workspace, and folder), allowing common debugger settings to be defined once and inherited by all launch.json entries (e.g. initCommands, preRunCommands, postRunCommands, pretty-printer setup, target/platform hints, etc.). See the full list here.

vscode-cpptools currently lacks this capability, which forces duplication of complex base configurations within a project.

Please add simple Launch Configuration Defaults, for example: C_Cpp.default.cppdbg.launch and C_Cpp.default.cppdbg.attach (optionally VS debugger equivalents), applied before launch.json and overridable per configuration.

I understand that proper configuration inheritance inside launch.json would be a more general VS Code-level solution, but it is unlikely to be implemented anytime soon. This proposal solves the problem now, in a very simple way, and follows an already proven model.

A typical use case is shipping a workspace file in the repository with complex base debugger setup (pretty printers, init commands, debugger tuning), while users only customize launch.json configs with parameters such as args and cwd.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the linked CodeLLDB Launch Configuration Defaults documentation and compare it with the extension's launch.json and C_Cpp.default settings. Trace how cppdbg launch and attach configurations are processed. Done means user, workspace, and folder defaults are applied before each configuration and can be overridden per configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp, vscode
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.