Function Call Stack in C++

倾然丶 夕夏残阳落幕 提交于 2019-11-30 21:26:28

If your environment is Visual Studio, you can insert a Tracepoint and input

$CALLSTACK

in its edit box, after checking Print a message.

To do it, right-click on the line you want and select Breakpoint > Insert Breakpoint (or alternatively, insert a breakpoint clicking on the left of the editor line you want, then select When Hit).

Then you will see a detailed report in the Output window, having file name, line number and function name. It served me to successfully discovered some memory leaks.

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