Home > Blockchain >  Run terminals on vscode start
Run terminals on vscode start

Time:07-16

I want a few terminals opened when I start vscode. The docs show how to do it.

My .vscode/tasks.json:

{
  "label": "create terminals",
  "runOptions": { "runOn": "folderOpen", },   // <--- should run task on vscode start (but doesn't)
  "dependsOn": [ "foo", "bar" ],
},
{ "label": "foo", "type": "shell", "command": "/bin/zsh", "options": { "cwd": "${workspaceFolder}/foo/", }, "isBackground": true, "problemMatcher": [], "presentation": { "echo": false, "panel": "dedicated", "focus": false, "reveal": "never", "group": "terminals" } },
{ "label": "bar", "type": "shell", "command": "/bin/zsh", "options": { "cwd": "${workspaceFolder}/bar/", }, "isBackground": true, "problemMatcher": [], "presentation": { "echo": false, "panel": "dedicated", "focus": false, "reveal": "never", "group": "terminals" } },

That does not run on vscode start. However it works as expected when I run it manually.

How do I make it run on vscode start?

CodePudding user response:

Seems there is more to it - one must also enable "automatic tasks".

Like this: ctrl p, "Manage Automatic Tasks in Folder", "Allow Automatic Tasks in Folder".

Apparently this will be exposed as a setting in the next vscode version (1.70)

  • Related