vscode-cpptools
vscode-cpptools copied to clipboard
Configuration: Inherit Other Configs
General Info
- OS and Version: Microsoft Windows [Version 10.0.19042.685]
- VS Code Version: 1.52.0
- C/C++ Extension Version: 1.1.3
Describe the Feature
I don't think this feature has been requested yet, so I figured I'd toss it in: I have some configurations for a C++ project which by default are non-debug defined configurations. These will have all of my paths and custom variables I would like to normally use if I don't want to compile a debug version. However, I would like for configurations to be able to inherit a previously created configuration's data to its own so I can override specific fields. For example:
{
"configurations":
[
{
"name": "Test",
"includePath": [ ... ],
"compilerPath": ...
"browse":
{
"path":
[
...
]
}
"defines": [ ]
},
{
"name": "Test {Debug}",
"basedOn": "Test",
"defines": [ "__DEBUG__" ]
}
]
}
In this instance, creating the "debug" variant of Test will automatically use the fields from that configuration and then override the defines section with its own.
References
Please let me know if there's any other information I can provide.
One existing way to "inherit" is to use the C_Cpp.default.* workspace folder settings for the settings you want to inherit and then each config can override the other ones.
This feature request is being closed due to insufficient upvotes. When enough upvotes are received, this issue will be eligible for our backlog.
Would be very useful for us too.
This feature request has received enough votes to be added to our backlog.