I intend to write a task, that first runs a dev server command, and parallely opens VS code's Simple Browser (Command Pallette -> Simple Browser) to the url.
I dont need the task to dynamically get the url from the dev server.
I've managed to make task to open the Simple Browser using input variable
{
"version": "2.0.0",
"tasks": [
{
"label": "open simple browser",
"command": "${input:openSimpleBrowser}",
"problemMatcher": []
}
],
"inputs": [
{
"id": "openSimpleBrowser",
"type": "command",
"command": "simpleBrowser.show",
"args": ["https://xkcd.com"]
}
]
}
One thing that I didn't find the documentation of is to find the name of the command. I found the name simpleBrowser.show
by chance in VSCode itself. Apparently, you can get the name of each command in the command palette by:
Configure Binding
cog icon, which will take you to Keyboard Shortcuts
@command:simpleBrowser.show
:
for input variableIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With