使 Microsoft Visual Studio 代码调试控制台变得干净

问题描述

如何才能真正使我的 Microsoft Visual Studio 代码控制台干净,以便在运行代码不显示路径。我只想看到我的输出,仅此而已。如果您有任何想法,请给我建议。click here to view image

解决方法

  1. 在调试停止时自动关闭控制台窗口。

要执行此操作,请先转到 tools->options->debugging->Automatically close the Console Window when Debugging stops

然后点击debug->start without debugging->

  1. 或使用系统暂停命令

在程序末尾输入:- system('pause')

警告:这仅适用于 Windows。

然后点击debug->start debugging