Each time you step into a new method with the debugger, a new entry is added to the call stack [1]. So, if you enter method x, the call stack pane shows x along with (optionally) some other information such as the name of the source file and the line number. If some code in the x method calls the y method, the call stack will show entries for x and for y. But these are not just static indicators of the methods which your program has passed through; they are active ‘moments’ in the flow of execution which can be recalled just by clicking each entry in the call stack.
So if, for example, you have a parameter called aString which has the value “hello world” when it is passed to x; has been changed to “HELLO WORLD” by the time it is passed to y and has become “DLROW OLLEH” when it arrives at z, you can flip up and down the call stack, recalling each point of execution – each ‘moment in the history’ of the program – and view the changing values of aString at each point.
This even works with recursive methods. If a method calc increments a variable sum as it repeatedly calls itself, you can navigate up and down each separate instant at which the calc method was recursively called to check on the changing value of sum.
The call stack is a tremendously useful debugging tool. Be sure to check it out!
Watch A Screencast of the Call Stack
Watch More Ruby In Steel Screencasts