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.

In reply to Re^3: Debug recursion ? by ysth
in thread Debug recursion ? by Alien

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.