Home > Blockchain >  VS code - Hide build/echo task for cpp
VS code - Hide build/echo task for cpp

Time:12-10

I'm using VS Code for running c code.

Whenever I Ctrl Shift B to build my .cpp file, an 'echo' tab pops up, which makes the entire bottom panel appear and then I am asked to "Terminal will be reused by tasks, press any key to close it."

I don't want the tab or the panel to pop up at all and want the entire build process to happen in silence, nothing pops up.

This is my tasks.json file

{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
    {
        "label": "echo",
        "type": "shell",
        "command": "gcc",
        "args":[
            "main.cpp","-lstdc  ","-o" ,"main.exe"
        ],
        "group": {
            "kind": "build",
            "isDefault": true
        }
    }
]

}

CodePudding user response:

Solved by downgrading VSCode to 1.60: https://code.visualstudio.com/updates/v1_60

CodePudding user response:

This can be configured using "presentation": {...}. Following worked for me:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Test task",
            "type": "shell",
            "command": "echo Hello world",
            "presentation": {
                "echo": true,
                "reveal": "never",
                "showReuseMessage": false,
            }
        }
    ]
}
  • Related