Is there a way to execute an ssh command when debugging a project with .vscode/launch.json?
For example: ssh -i xxxxx.
O
The format changed. Visual Studio Code can create the tasks.json file for you. Inside your launch.json file and inside any configurations object, just define preLaunchTask to force auto-creation of the tasks.json template file:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "launch program",
"skipFiles": [ "/**"],
"preLaunchTask": "myShellCommand",
"program": "${workspaceFolder}/test.js"
}
]
}
If you do not have file tasks.json configured:
Your tasks.json template file will then be created for you. Add your command to command and the name you put in preLaunchTask to label:
{
"version": "2.0.0",
"tasks": [
{
"label": "myShellCommand",
"type": "shell",
"command": "echo goodfood"
}
]
}