1

Does Visual Studio 2015/2017 have a debug view that displays the CPU stack continuously updating when ESP or stack contents change?

When low level debugging native C++ code in assembler, I want to watch the CPU stack while stepping through my code. I want to see some bytes below the current stack pointer and some above it. And I want changes that occur during each debug step to be marked in the view.

I don't want to input 'esp' into the address field after each debug step as is required when using memory view for this. So answers in question Show Stack content (not stack call) at visual studio 2013 does not solve my request.

I want to step through assembler using F10/F11 and I want to see the bytes on the raw CPU stack to be able to follow access to objects not on the current call stack frame. So I can't use the "Call Stack" view which gives me a just a C++ view of the function call stack.

That functionality was common to debuggers on old DOS days. I can't find it in Visual Studio 2015/2017.

Thanks

6
  • It is more convenient. The Call Stack window displays the chain of function calls. The Locals window displays local variables stored in the stack frame. If you want to see the raw view like you used to then use Debug > Windows > Memory > Memory 1 and put "esp" in the address box. Keep in mind that the Debug build with default settings adds a lot of stuff to the stack frame to help diagnose UB and support Edit+Continue. Commented Mar 7, 2018 at 11:51
  • Hans, thank you for your comment. May I read from it that there is no dedicated assembler CPU stack view (that sticks always to the current ESP) in Visual Studio? Commented Mar 7, 2018 at 12:45
  • Surely you ought to read that staring at raw memory content is a lot less useful than you think it is. Try it, only way to flip that mental switch. Commented Mar 7, 2018 at 12:51
  • @Jan Paulmann, We often use the CPU Usage tool or debugging Diagnostic tool to analyze or collect the CPU performance, but not very sure that whether it is the tool what you want to get: blogs.msdn.microsoft.com/visualstudio/2016/02/15/… and msdn.microsoft.com/en-us/library/dn971856.aspx
    – Fletcher
    Commented Mar 9, 2018 at 5:28
  • @Fletch Zhou-MSFT: I want to debug function not performance. Visual Studio supports coding in C++, C and ASM and for debugging on ASM level I expect a dedicated stack view. The C++ "Call Stack" view is not appropriate here and the Diagnostic tool is far from that because it's for performance debugging. Commented Mar 9, 2018 at 11:10

0