Test "attach to process" picker and author another variable that is bound to a command #8196
Closed
3 tasks done
Labels
Milestone
Test for #6569:
VS Code supports variable substitution in launch configurations for some time.
With this release extension authors can introduce a new kind of variable that binds to a command.
These commands can be registered in an extension and their return value is used as the variable's value and the implementation of the command can use whatever UI is available for an extension.
When a debug session is started, all command variables that occur in the underlying launch config are first collected and then executed. Multiple occurrences of a variable do not result in multiple execution. At the end the variables in the launch configuration are substituted with the command results.
An example for this functionality can be found in node-debug. Here a variable
${command.PickProcess}
is bound to a process picker command. A new 'Attach to Process' launch config uses the variable to let the user pick a 'node' process when running the launch config.Verify that the mechanism can be used by extension authors:
Create a new command variable that maps to another command, e.g. some string input UI that asks for a host id, or a picker that gets some QuickPick choices from the launch config, and returns the selected item.
The simplest way to do this is:
https://github.com/Microsoft/vscode-node-debug.git
src/extension.ts
debuggers
contribution point in thepackage.json
args
attribute to a simple node program that prints the arg.The text was updated successfully, but these errors were encountered: