What is the purpose of the Call Stack window in Visual Studio?

What is the purpose of the Call Stack window in Visual Studio?

+5
source share
4 answers

Each time you call a method, the record is pushed onto the stack for this thread, which describes the method and the parameters used to call the method. When the method returns, the method and its parameters are removed from the stack. This is how the operating environment knows where to return when the method ends. It simply removes the top entry from the stack, clears any local variables created during this stack frame, and returns to the previous method. (This is simplified, but overall an idea.)

You can think of it literally as a “stack” of instructions that you received here.

, .

, , , , . , , ( Visual Studio), . , , . , , . .

, ( ). , .. , , .

+3

(.. ), " " , , , , , (.. , , - //).

, - (F9), , , , . . , .

: - , . " " .

+7

- , .

Exception, , .

Visual Studio , , . , , .

+1

The purpose of the call stack window is to give you access to the code for the full code that brought you to the current instruction. You can use it to go to previous function calls inside the program, check local variables, parameters, etc. This is an invaluable tool for determining why your code does what it does.

+1
source

All Articles