【问题标题】:How to debug in cmd.exe instead of "MS VS Debug Console"如何在 cmd.exe 而不是“MS VS 调试控制台”中进行调试
【发布时间】:2019-12-04 09:54:48
【问题描述】:

每次我去调试代码时,它都会在 Microsoft Visual Studio Debug Console 而不是 cmd.exe 中进行调试。我是不是调试错了,因为每个教程/视频都显示CTRL + F5 直接进入cmd.exe 调试窗口。

此外,由于某种原因,我的调试窗口底部出现了一堆无用的文本。

这就是我得到的:

Hello world!

C:\Users\NAME\source\repos\Project1\Debug\Project1.exe (process 13160) exited with code 0.
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . . .

【问题讨论】:

标签: c visual-studio debugging cmd


【解决方案1】:

我不确定你想说什么,但我会尽力帮助你。

我可以收集到的是您正在尝试调试您的代码,并且从您的图像中我可以看到“Hello World!”作为输出。所以你需要做的就是设置一个断点然后运行它。

要在代码所在行的左侧设置断点,单击它会在代码前面放置一个点,或者您可以右键单击并设置断点。这就是你的断点。现在尝试调试执行将在断点处停止,然后您可以使用 F10 或 next 来检查您的代码。

【讨论】:

    猜你喜欢
    • 2018-09-09
    • 2021-02-18
    • 1970-01-01
    • 2018-07-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-03
    相关资源
    最近更新 更多