microsoft / microsoft/vscode-cpptools
Simplify generated launch.json
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Hey,
VSCode dev here. This milestone I am looking into simplifing generated launch.json for various extensions Microsoft/vscode#62851
The launch.json that C++ generates is attached at the end. I suggest to simplify it the following way:
-
DebugConfigurationProvidershould use thequickPickto ask the user if he would like to launch or attach. After that for the program name. Optimally it should be able to detect those things on its own, but if not possible usequickPickto ask the user. - Remove default fields which are not necessery like
cwd,stopAtEntry,args, 'environment' - Do users ever change
MIMode/ If no than this property should be append in the resolveConfiguraiton calls. That way the user will not see any of this and there will be far less clutter - You are already contributing snippets to launch.json, but not using the
configuraitonSnippetsfield in the package.json. Why is that? Also these snippets could be simplified
If you agree with the suggestions I am making here I am also here to help with any potential questions you might have. The changes should not require a lot of work but will simplify the flow a lot imho. It should be much less complex and not too much like a wizard experience
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(lldb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "enter program name, for example ${workspaceFolder}/a.out",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "lldb"
}
]
}
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 with the DebugConfigurationProvider and its resolveConfiguration calls, then inspect package.json for configurationSnippets. Review how launch.json is currently generated, including the launch/attach and program prompts and default fields. Done means the generated configuration and snippets are simpler while preserving the required launch behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100