Visual Studio- way to see the stack size growing whilst stepping through?

走远了吗. 提交于 2020-01-02 23:17:50

问题


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

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