Stack operations allow to:
- move between frames in a call stack to change context for viewing local variables and evaluating expressions,
- or pop in the call stack to return back in execution.
Make Current action invoked on a call stack frame jumps to the line of source code described by the frame.
Local variables and watches are evaluated according to the new position.
It is usable when you want to evaluate values of variables before the current code was called.
I need to know what was value of the variable number before the make method was called:
- Go to the main Debugging View (or open Call Stack view in NetBeans 6.1 or older).
- Doubleclick the desired line in the stack (i.e. run:24) or invoke Make Current action from context menu.
- The row in the stack view becomes bold and you can see the value of number variable in Local Variables view
Pop To Here
Pop To Here returns suspended thread back to a selected position in methods call stack.
It is usable when you want to return back in called methods sequence and debug something again.
In the used example you can call Pop To Here action instead of Make Current. The debugger will return back to the line 24. You can watch than value of variable number but make method argument value will be different.