if I'm on line 61, I want to not execute whatever is on line 61 and goto line 62.

I think your only option is to edit the script first to comment out line 61, then run with the debugger with a breakpoint at line 62. If, upon reaching line 62, you decide you want to apply whatever was on line 61, just paste that line of code as a debugger command, and now things would be just as if line 61 had not been commented out.

Another approach would be to create a new variable and wrap line 61 inside a conditional block on that variable like:

my $dbg61 = 0; # <- add this line if($dbg61){ original code of line 61 }
Then when you step to the original line 61 (which now begins with if($dbg61), and which might now be line 62 because you had to add a line above it), you can just reset the value of $dbg61 according to whether you really want that line to execute.

This poses the dilemma that in order to debug the app, you have to change the code in ways that you wouldn't want to retain in production. But once you figure out whatever is wrong with your original line 61, you should be able to put things back as they are supposed to be.


In reply to Re: Using the perl debugger by graff
in thread Using the perl debugger by incognito129

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.