This repository was archived by the owner on Jul 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 284
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
Simplify generated launch.json #404
Copy link
Copy link
Closed
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 ruby generates is the following:
{
// 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": "Debug Local File",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/main.rb"
},
{
"name": "Listen for rdebug-ide",
"type": "Ruby",
"request": "attach",
"cwd": "${workspaceRoot}",
"remoteHost": "127.0.0.1",
"remotePort": "1234",
"remoteWorkspaceRoot": "${workspaceRoot}"
},
{
"name": "Rails server",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/bin/rails",
"args": [
"server"
]
},
{
"name": "RSpec - all",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/bin/rspec",
"args": [
"-I",
"${workspaceRoot}"
]
},
{
"name": "RSpec - active spec file only",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/bin/rspec",
"args": [
"-I",
"${workspaceRoot}",
"${file}"
]
},
{
"name": "Cucumber",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/bin/cucumber"
}
]
}
This is simply overwhelming and I believe it should be improved with the following:
-
cwdshould not be in every configuration, instead the default value should be${workspaceRoot}. You can register aDebugConifgurationProviderwhich will just resovle every launch configuration by appending "cwd": ${workspaceRoot} - All these configurations should be contributed also as snippets, since then they would be offered in inteli-sense when user presses
Add Configurationblue button. Example - When the
launch.jsonneeds to be generated the suer should be asked via QuickPick what kind of launch configuraiton he wants. Based on his response we should just generate that configuration, and not all of the above. If you are interested in doing this I can point you to an example I will write in a couple of days.
All of this should be pretty straightforward. Please let me know if you need help.
thomthom and williamhatch
Metadata
Metadata
Assignees
Labels
No labels