-
Notifications
You must be signed in to change notification settings - Fork 37.6k
Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.6.2
- OS Version: Ubuntu 18.04
I'm trying to launch several terminals using tasks. I have two use cases each with slightly different behaviors but both not really working as expected.
Launching new terminals in split view that remain open and interactive
I want to have a task that launches a bunch of terminals that are not running any particular command. I want to be able to type commands into these terminals. I use the following configuration in tasks.json:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "repos",
"dependsOn": [
"repo1",
"repo2",
],
"problemMatcher": [],
},
{
"label": "repo1",
"type": "process",
"command": "bash",
"options": {
"cwd": "${workspaceFolder}/repo1",
},
"isBackground": true,
"problemMatcher": [],
"presentation": {
"group": "repos-group",
"echo": false,
"focus": false,
"panel": "dedicated",
}
},
{
"label": "repo2",
"type": "process",
"command": "bash",
"options": {
"cwd": "${workspaceFolder}/repo2",
},
"isBackground": true,
"problemMatcher": [],
"presentation": {
"group": "repos-group",
"echo": false,
"focus": false,
"panel": "dedicated",
}
}
]
}There's two tasks - repo1 and repo2 - that open a new bash terminal in a specific directory. These share the same presentation group so the terminal should be split. There's one more task - repos - that simply runs the other tasks using dependsOn.
Running the repos task opens both terminals, but not in split view:
the expected behavior is this:
Launching two terminals in split view that run a command
I started with the following configuration in tasks.json:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "system",
"dependsOn": [
"htop",
"nvidia-smi",
],
"problemMatcher": []
},
{
"label": "nvidia-smi",
"type": "shell",
"command": "nvidia-smi -l 2",
"isBackground": true,
"problemMatcher": [],
"presentation": {
"group": "system-group",
"echo": false,
"focus": false,
"panel": "dedicated",
}
},
{
"label": "htop",
"type": "shell",
"command": "htop",
"isBackground": true,
"problemMatcher": [],
"presentation": {
"group": "system-group",
"echo": false,
"focus": false,
"panel": "dedicated",
}
}
]
}There are two shell tasks that run a specific command. Again, these share the same presentation group. There's one other task that runs the shell tasks using dependsOn.
Running the system task opens both terminals but not in split view:
the expected behavior is:
Interestingly, in this use case, if I change the type from shell to process I get the expected behavior 😕



