question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Launch task directly into split terminal

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:30
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

12reactions
TwitchBronBroncommented, Dec 11, 2018

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.
2reactions
flepscommented, Dec 11, 2018

This would be awesome!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to split the terminal when running tasks in VSCode?
Use the tmux command to start a new session, then press ctrl/cmd + b and % for vertical split or " for horizontal...
Read more >
Visual Studio Code Tasks and Split Terminals
To create a task, you open up the command pallette and pick "Tasks: Configure Task" and you'll be prompted with some default template...
Read more >
Visual Studio Code Tasks and Split Terminals
To create a task, you open up the command pallette and pick "Tasks: Configure Task" and you'll be prompted with some default template...
Read more >
Integrated Terminal in Visual Studio Code
Groups (split panes) · On hover, selecting the inline split button. · Right-clicking the context menu and selecting the Split menu option. ·...
Read more >
Edit and run code in Visual Studio Code
Learn the basics of editing and running code in VS Code. ... Install the Node.js runtime to execute JavaScript code. ... Split Terminal...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found