Open Jackenmen opened 1 year ago
I probably don't have time for this right now but if its something you want to add support for you are welcome to open a pull request.
This could be useful for some other cases as well like adding a promptPID
type that lets the user select a process to attach to.
Today I was doing some debugging, changing arguments in the debugger configuration between runs which was a bit of a hassle and I started wondering whether perhaps this is an already solved problem. When doing so, I first found the
${command:SpecifyProgramArgs}
option of the VS Code Java extension and opened feature requests for different vs code extensions but since the language I was interested in was not Java and the feature requests weren't pursued, that wasn't really useful.Pursuing this a bit more, I encountered a feature of VS Code's debugging and task configuration files that solves this problem nicely - input variables. Input variables are substitutions that you can define under
"inputs"
key inlaunch.json
and later use in e.g. debugger configuration with${input:variableID}
. Then when you launch the debugger with the configuration that requires some inputs, VS Code will prompt you for those variables (either through free text or through a list of options to choose from, depending on input definition), as well as allow you to use its defined default value (if any is provided).I think that this would be a useful addition to this plugin as well and one of the use cases would be the previously mentioned
args
argument. Here's how an examplelaunch.json
with this options looks ("inputs"
key would probably map to"debugger_inputs"
in sublime project file):Note that
"args"
key specifically can be a string in VS Code since July 2022 (for participating extensions, whatever that means): https://github.com/microsoft/vscode/issues/83678#issuecomment-1236381454 This isn't the only use case of course (being able to choose the component to run with inputs could be quite useful too) but I would appreciate if this case could be supported as well if you choose to pursue this.