问题描述
在Visual Studio 2012中断言失败时,如何查看堆栈跟踪?如果将我附加到某个进程,则该进程将按预期工作,但是当我仅使用F5(调试)进行构建时,会发生我的断言,并显示中止,重试,忽略"提示,但在该进程中看不到我的调用堆栈.调试器.
How can I see the stacktrace when my assert fails in visual studio 2012? If I am attahed to a process, it works as expected, but when I just build using F5 (debug), my assert happens, giving me the "Abort, Retry, Ignore" prompt, but I don't see my callstack in the debugger.
在调试构建过程中是否有任何方法可以启用它,还是我总是必须先构建然后附加到该过程中?
Is there any way to enable it during debug builds, or will I always have to build and then attach to the process?
我的assert只是一个简单的assert(1 == 2),可以使其失效并查看调用堆栈.
My assert is just a simple assert(1 == 2) to get it to fail and see the callstack.
推荐答案
按下Retry
按钮将激活调试器,使您可以查看调用堆栈,本地变量等.
Pressing the Retry
button will activate the debugger, allowing you to see your callstack, locals, etc.
这篇关于如何在Visual Studio 2012中查看断言失败的C ++堆栈跟踪?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!