如何解决VS Code中C++调试控制台启动消息无法完全移除的问题?
解决VS Code调试C++时蓝色启动消息无法移除的问题
- 在你的
launch.json的logging配置节点中添加"engineLogging": false,这个选项可以关闭调试引擎产生的启动类蓝色提示信息,修改后的完整配置如下:
{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "Debug C++", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/main.exe", "cwd": "${workspaceFolder}", "logging": { "moduleLoad": false, "threadExit": false, "processExit": false, "engineLogging": false } } ] }
- 如果添加后蓝色消息仍存在,可尝试在
logging中再加入"programOutput": false,这会屏蔽程序启动时的默认输出信息。 - 若上述方法都无效,可开启
"externalConsole": true配置项,将调试输出转移到外部控制台窗口,VS Code的调试控制台就不会显示这类蓝色提示了。
内容的提问来源于stack exchange,提问作者MoonLightWarrior
相关产品推荐
相关产品推荐

