Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 548
LeonidasFett Avatar asked Nov 07 '22 02:11

LeonidasFett


1 Answers

ITNOA

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

like image 108
sorosh_sabz Avatar answered Nov 18 '22 08:11

sorosh_sabz