LeonidasFett
LeonidasFett

Reputation: 3132

Run tasks in Integrated Terminal in VSCode?

when I ran tasks (tasks.json) in the past, they ran inside the Integrated Terminal in VSCode. However, after resetting my dev machine and reinstalling everything, my tasks now run in a new cmd window. This is a problem when the task fails with an error. In this case, the cmd window is just closed and I can't read what the actual error is.

How do I get the tasks to run in the Integrated Terminal again?

Upvotes: 6

Views: 11196

Answers (1)

sorosh_sabz
sorosh_sabz

Reputation: 3003

If you are using task.json with version 2

you just need write presentation property in tasks like below:

        "presentation": {
            "echo": true,
            "reveal": "always",
            "focus": true,
            "panel": "shared",
            "showReuseMessage": true,
            "clear": false
        }

full example like below

"tasks": [
    {
        "label": "example",
        "type": "shell",
        "command": "foo",
        "args": [],
        "presentation": {
            "echo": true,
            "reveal": "always",
            "focus": true,
            "panel": "shared",
            "showReuseMessage": true,
            "clear": false
        }
    }
]

for more information you can read vscode task.json help

Upvotes: 1

Related Questions