【问题标题】:g++ custom task opens in external terminal intead of vs code internal terminalg ++自定义任务在外部终端而不是vs代码内部终端中打开
【发布时间】:2018-01-17 13:18:15
【问题描述】:

我在 VSCode 中有以下任务来构建 C++ 程序。

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build my app",
            "type": "shell",
            "command": "g++",
            "args": [
                "-std=gnu++0x", "-Wall", "-Werror", "-g", "tutorial.cpp"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}

但是,每次我运行它时,输出都会在外部终端中打开。我想运行我的构建并在内部终端中查看输出。 这可能吗?如果可以,我需要改变什么?

【问题讨论】:

    标签: c++ visual-studio-code vscode-tasks


    【解决方案1】:

    集成终端面板的行为是通过任务的presentation 属性控制的。添加以下内容:

    "presentation": {
                    "reveal": "always",
                    "panel": "new"
    }
    

    它提供following options

    • 揭示
    • 专注
    • 回声
    • 面板

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-02-06
      • 2019-07-01
      • 2014-10-02
      相关资源
      最近更新 更多