如何在 Visual Studio Code 中设置启动配置的默认终端类型?

如何在 Visual Studio Code 中设置启动配置的默认终端类型?

我按照官方说明在我的用户设置中创建了一个启动对象:

https://code.visualstudio.com/docs/editor/debugging#_global-launch-configuration

{
    "workbench.startupEditor": "newUntitledFile",
    "editor.minimap.enabled": false,
    "window.titleBarStyle": "native",
    "window.zoomLevel": 0,
    "editor.autoClosingBrackets": "never",
    "editor.autoClosingQuotes": "never",
    "java.configuration.checkProjectSettingsExclusions": false,
    "java.errors.incompleteClasspath.severity": "ignore",
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "terminal.external.linuxExec": "gnome-terminal",
    "terminal.explorerKind": "external",
    "launch": {
        "configurations": [
            {
                "console": "externalTerminal"
            }
        ]
    }
}

当我使用这些设置运行文件时,生成的 launch.json 如下所示:

{
    "configurations": [
        {
            "type": "java",
            "name": "CodeLens (Launch) - Dreieck",
            "request": "launch",
            "mainClass": "de.ostfalia.gdp.ss19.s2.Dreieck",
            "projectName": "gdp"
        },
        {
            "console": "externalTerminal"
        }
    ]
}

第二个块没有任何效果,代码仍然在默认调试控制台上运行。

它应该生成如下文件:

{
    "configurations": [
        {
            "type": "java",
            "name": "CodeLens (Launch) - Dreieck",
            "request": "launch",
            "mainClass": "de.ostfalia.gdp.ss19.s2.Dreieck",
            "projectName": "gdp",
            "console": "externalTerminal"
        }
    ]
}

我可以做些什么让 vscode 生成这样的工作启动文件?

相关内容