Vscode: Launch task directly into split terminal

Created on 6 Apr 2018  路  5Comments  路  Source: microsoft/vscode

Issue Type: Feature Request

The integrated terminal split panes should support launching a task from the command palette into a split terminal panel.

Here is the current workflow

  1. Launch a long-running task from command palette by typing ctrl+p -> task first-watcher-task -> enter. (A new terminal window appears, running the task).
  2. Click the split terminal button to create a split terminal.
  3. In the split terminal, type the arguments for the second task and run it by pressing the enter key in the terminal. Can't run ctrl+p -> task second-watcher-task -> enter because that would open a whole new terminal section of its own.

Here is the desired workflow

  1. Launch a long-running task from command palette by typing ctrl+p -> task some-watcher-task -> enter. (A new terminal window appears, running the task).
  2. Launch the second long-running task from comand palette by typing ctrl+p -> task second-watcher-task -> enter. Somehow, this task runs in a second panel of the split terminal, based on some extra command, a task configuration setting, or perhaps by having focus in an already opened split terminal.

VS Code version: Code - Insiders 1.22.0-insider (81335051b2d1460112905c2bce23c205e7cdd231, 2018-04-03T01:09:54.914Z)
OS version: Windows_NT x64 6.1.7601

api api-proposal feature-request tasks

Most helpful comment

One idea is to create a new terminalGroup field.

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "ionic-serve",
            "type": "shell",
            "command": "ionic serve",
            "isBackground": true,
            "terminalGroup": "watchers"
        },
       {
            "label": "dotnet-serve",
            "type": "shell",
            "command": "dotnet watch",
            "isBackground": true,
            "terminalGroup": "watchers"
        }
    ]
}

Here's how it would flow:

  1. Launch task ionic-serve. No consoles are open, so it creates a new console for the task and gives it the name 'watchers'.
  2. Launch task dotnet-serve. There's already a terminalGroup with the name watchers, so that terminal is split, and the new dotnet-serve task is run in the right part of the split terminal.

All 5 comments

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

This would be awesome!

One idea is to create a new terminalGroup field.

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "ionic-serve",
            "type": "shell",
            "command": "ionic serve",
            "isBackground": true,
            "terminalGroup": "watchers"
        },
       {
            "label": "dotnet-serve",
            "type": "shell",
            "command": "dotnet watch",
            "isBackground": true,
            "terminalGroup": "watchers"
        }
    ]
}

Here's how it would flow:

  1. Launch task ionic-serve. No consoles are open, so it creates a new console for the task and gives it the name 'watchers'.
  2. Launch task dotnet-serve. There's already a terminalGroup with the name watchers, so that terminal is split, and the new dotnet-serve task is run in the right part of the split terminal.

I support this proposal for tasks (particularly "terminalGroup" idea suggested above) but think this feature should be supported for launch configs too.

I use integrated terminals and a compound launch configuration for debugging multiple Node processes with Nodemon. It would be great to have "terminalGroup" option when "integratedTerminal" specified in launch config to support split terminals when debugging. This would stop me forever cycling between terminals when debugging. It would also enable me to have one terminal with multi-splits for tasks, another with multi-splits for debugging, etc. This would be awesome for terminal management.

@alexr00 I'm not familiar with this terminalGroup concept, there is a similar request for the terminal API, we should align these if it's possible https://github.com/Microsoft/vscode/issues/45407

Was this page helpful?
0 / 5 - 0 ratings