microsoft / microsoft/vscode-cpptools
Configuration: Inherit Other Configs
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing how the C/C++ extension currently loads and selects configurations; the issue names no files or tests. Compare the proposed basedOn example with existing configuration behavior, and consider the work complete when a derived configuration inherits fields and overrides defines.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100