When I used to write a lot in C, there were a few cases where debuggers were very
useful as compared to just being a crutch.
I could attach to a long running daemon to check out a bug that only occurred after
the program had been running for days on end. Also, it was easier to observe the state
of various data structures, rather than add/remove print statements or control flow changes and rebuild the code twice.
If you really want to, you can also get better test coverage for code paths that are
extremely unlikely to occur in real life, without altering the actual code.
In perl, I have hardly ever used a debugger, and in the cases where I did, probably
have never really needed to.
Adding and removing things like verbose logging, Data::Dumper prints, etc, is just so
quick and easy there is almost no point. About the only time I could forsee really
needing it would be if I had to try to debug a problem that is occuring in production
in someone else's perl code (e.g. a CPAN module), and I didn't want to alter their code for fear of perturbing
some other process on the system. Hasn't happened to me yet...
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.