If you don't want to go through the subroutine , you can press r , and the code continues it's execution after the subroutine call.
I'm not sure if you are confused in how you are presenting it or confused in your understanding. r makes the code resume execution right where it was, but without the debugger in single-step mode, reverting to single-step mode in the current function's caller. Or that's what it's supposed to do; as you noticed, it doesn't
seem to work correctly when the debugger breaks with "100 levels deep...".
You've tried to clarify what r does; but I was asking for more information about what you are trying to do.
Try removing any function calls from your return statements; in your example, make it
$n *= fact($n-1);
return $n;
(without doing this, r doesn't do anything helpful, even without the deep calls) then use r repeatedly until you are out of dumvar:: and back into your code.
| [reply] [d/l] |
And I should press r 100 times ( in a recursive subroutine case )? Isn't there a better way ?
| [reply] |
So you want to get out of all the levels of recursion? Set a breakpoint just after the initial call to the recursive subroutine (in your "c 10" example, there's already one there) and use c.
| [reply] |