How to see C++ stack trace for assert failure in V

2019-02-24 08:46发布

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条回答
欢心
2楼-- · 2019-02-24 09:21

(Reposting from comment)

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

查看更多
登录 后发表回答