-
Notifications
You must be signed in to change notification settings - Fork 727
Closed
Labels
DebuggerLaunch and Task AssetsSuggestionfixedFixed and available in the stable version of C# Extension.Fixed and available in the stable version of C# Extension.
Milestone
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. This is far too complex for the avarage user. I suggest to simplify it the following way:
-
DebugConfigurationProvidershould use thequickPickto ask the user if he would like to debug the console or a web app or to attach. After that it should ask what is the target framework and what is the project name if he did not choose attach. 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
internalConsoleOptions,args,cwd - Do users ever change anything in the
launchBrowser,envandsourceFileMapproperties. If no than these properties 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
configuraitonSnippetswhich is great. However these snippets also need to be simplified. I suggest to remove all attributes that have the default value. Example:stopAtEntry,cwd,args
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": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/bin/Debug/<insert-target-framework-here>/<insert-project-name-here>.dll",
"args": [],
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/bin/Debug/<insert-target-framework-here>/<insert-project-name-here>.dll",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart",
"launchBrowser": {
"enabled": true,
"args": "${auto-detect-url}",
"windows": {
"command": "cmd.exe",
"args": "/C start ${auto-detect-url}"
},
"osx": {
"command": "open"
},
"linux": {
"command": "xdg-open"
}
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
Metadata
Metadata
Assignees
Labels
DebuggerLaunch and Task AssetsSuggestionfixedFixed and available in the stable version of C# Extension.Fixed and available in the stable version of C# Extension.