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...
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|