How to see C++ stack trace for assert failure in Visual Studio 2012?

落花浮王杯 提交于 2019-12-04 03:58:31

问题


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?

My assert is just a simple assert(1 == 2) to get it to fail and see the callstack.


回答1:


(Reposting from comment)

Pressing the Retry button will activate the debugger, allowing you to see your callstack, locals, etc.



来源:https://stackoverflow.com/questions/14695977/how-to-see-c-stack-trace-for-assert-failure-in-visual-studio-2012

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!