[英]How to make VS Code not open a terminal when debugging?
I've installed VS Code on Ubuntu 17.04.我已经在 Ubuntu 17.04 上安装了 VS Code。
When I debug my C++ application, the output is displayed in a dedicated terminal and not within VS Code itself (like Eclipse does).当我调试我的 C++ 应用程序时,输出显示在专用终端中,而不是在 VS Code 本身中(就像 Eclipse 那样)。
How do I make VS Code display output within the editor itself, ie, not open another terminal?如何让 VS Code 在编辑器中显示输出,即不打开另一个终端?
My launch configuration is as follows:我的启动配置如下:
{
"version": "0.2.0",
"configurations": [
{
"name": "gdb",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/a.out",
"args": ["foo", "bar", "baz"],
"stopAtEntry": false,
"cwd": "${workspaceRoot}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "g++"
}
]
}
I'd hoped that setting externalConsole
to false would solve the problem.我希望将
externalConsole
设置为 false 可以解决问题。 However, it didn't change anything.然而,它并没有改变任何东西。
For a C++ project, use "externalConsole": false,
as follows:对于 C++ 项目,使用
"externalConsole": false,
如下所示:
This will open integrated terminal instead of external terminal.这将打开集成终端而不是外部终端。 You can use
"internalConsoleOptions": "openOnSessionStart"
if you want to open the debug console instead of the integrated/external console:如果要打开调试控制台而不是集成/外部控制台,则可以使用
"internalConsoleOptions": "openOnSessionStart"
:
For a Java project, use, "console": "integratedTerminal"
in the configurations file:对于 Java 项目,在配置文件中使用
"console": "integratedTerminal"
:
Use "console": "internalConsole"
if you do not want to see any debug console.如果您不想看到任何调试控制台,请使用
"console": "internalConsole"
。
Set "console":"none"
like such:像这样设置
"console":"none"
:
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}"
"cwd": "${workspaceFolder}"
"console": "none"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.