Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
When you use a debugger to find a problem in your code, you do indeed find the answer to that specific problem faster. But you lose an opportunity to review your logic and clean your code up, which can often solve more bugs and helps in comprehension.

I think I agree with you, but when I use debuggers, it's usually not on my code. In fact, I rarely use the perl debugger, because when I debug perl, its usually my own code :) I've on rare occasions used the perl debugger to help track down problems in library modules, but usually looking at the source is good enough because I find perl source easy to find, and (mostly) easy to follow.

I've mostly used debuggers with monolithic 4gl code which would include libraries on top of libraries, and the only way to find a problem without inserting a zillion print statements was to run the debugger (and I don't want to fully comprehend all the code, at least not today, I just want to fix the problem). And I would inherit problems from other programmers who would work for days on a problem but couldn't use the debugger, and I'd solve it in a few minutes or hours. So IMO it just depends on the environment. I use the perl debugger so rarely that every time I have a notion to use it, I find I have to relearn it :-)

Update: Oh, and one more reason I use the debugger less in perl is that you don't have to go through that 'compile it again' phase of the debugging process that you have to endure in other languages.

Very late update: Recently, I found myself tracking down a problem with totally unfamiliar CPAN http/socket library code. I inserted a couple of $DB::single; statements rather than numerous print's (these were dynamically loaded modules, so this was the easiest way to set breakpoints) and learned something about HTTP...specifically about chunking in the responses.


In reply to Re: Re (tilly): (tye)Re2: Are debuggers good? by runrig
in thread How to debug unknown dynamic code? by gaspodethewonderdog

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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others taking refuge in the Monastery: (3)
    As of 2025-03-15 14:11 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      When you first encountered Perl, which feature amazed you the most?










      Results (53 votes). Check out past polls.