问题
I know the call stack window shows all the function calls, but is there a way to see the size of the stack grow/shrink whilst stepping through the code?
I am using VS2012
Google just keeps returning how to increase the stack size...
回答1:
The stack actually doesn't change size while running. Each thread has a specific Thread Stack Size which is compiled into the executable.
There is no direct way to see the amount of the stack which is currently in use within the Visual Studio debugging environment, either, if that's what you would like to see.
回答2:
The stack size is fixed, the default is one megabyte. You can certainly see your code consuming space in the stack, the value of the ESP register, the stack pointer, is visible in the Debug + Windows + Registers window. Note that it will decrease as you step into functions.
来源:https://stackoverflow.com/questions/18935282/visual-studio-way-to-see-the-stack-size-growing-whilst-stepping-through