In a nutshell
Step out will make the debugger proceed until the next “return” so that control is returned to the preceding stack frame.
When to step out?
When you’ve seen all you need to at this point of the method and want to bubble up the stack frame.
Example use
Given the following code:
function main() {
var s = foo();
bar(s);
}
function foo() {
return "hi";
}
function bar(s) {
var t = s + foo(); // Debugger is currently here
return t;
}
If your debugger enters through main()
and is now on the first line of bar
, then telling the debugger to “step out” will make it finish executing the rest of the bar
method so that control is returned to the last line of the main
method.