Function Call Stack in C++

后端 未结 1 723
忘了有多久
忘了有多久 2021-01-05 23:37

I have tried the following links, from StackOverflow and other sites,[I tried, but it didn\'t helped me, so i can\'t avoid duplicating]

StackWalk64 on Windows - Get

相关标签:
1条回答
  • 2021-01-06 00:18

    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.

    0 讨论(0)
提交回复
热议问题