Skip to content

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

@dslijepcevic

Description

@dslijepcevic

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    debuggerhelp wantedCan be fixed in the public (open source) repo.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions