如何在 VS Code 中永久隐藏调试控制台?

How do I permanently hide the debug console in VS Code?

我想配置我的 Debug-Console,以便它每次都停止自动打开,我 运行 我的代码。仅供参考,我正在编写 C#,并使用 OmniSharp C# 扩展。


将调试控制台配置为停止自动打开

"To configure the Debug Console so that it doesn't open automatically when you run your code, you will need to correctly configure the following setting: debug.internalConsoleOptions by assigning the the string value "neverOpen" to it. The code snippet below demonstrates the correct configuration for disabling the Debug Console's Auto Open On Run feature."


    // ".../.vscode/settings.json"

    {
        "debug.internalConsoleOptions": "neverOpen"
    }

将设置添加到您的 settings.json 文件之一

"The configuration shown above can be configured in the user, or workspace settings.json file. Another option users have is to configure it via the V.S. Code GUI settings menu. The Settings Keyboard Shortcut, for opening the menu is shown below."

Settings Menu Keybinding: CTRL ,




编辑:

(编辑了下面的段落)

测试新配置的最佳实践:

"Its considered a good practice to always try a configuration for the first time in the workspace settings.json because the user settings.json file can be overridden by extensions. which can cause confusing results when testing new configurations. This is a Debug setting, so you need to go another step further, because launch.json is top level for debug settings, therefore you need to also add the setting to your launch.json file."

See this link to see what I am talking about



我不会写 C#,但它应该看起来像这样:

(我打赌你会在那里找到它,覆盖你的 settings.json 文件)

{
  "name": "Run_Nodejs_Debugger",
  "type": "node",
  "request": "launch",
  "program": "./build/index.js",
  "internalConsoleOptions": "neverOpen" // ADD IT HERE!!!!
  "args": [""]
}