Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Are debuggers good?

by osunderdog (Deacon)
on Jul 27, 2005 at 12:22 UTC ( [id://478570]=note: print w/replies, xml ) Need Help??


in reply to Re: Are debuggers good?
in thread How to debug unknown dynamic code?

I occasionally use the debugger for verifying small programs. However in large systems, rather than printing program information to stdout, I use a log file framework to capture diagnostic information. By using a log, you can capture information over time. Of course like print statements, there is an art to adding log statements at appropriate times.

I remember having a heated discussion with a 3rd party equipment vendor that started with me asking why they didn't produce logs. It finally came out that he didn't think that logging was a legitimate diagnostic tool because the technique is never taught in school. He encouraged his developers to use the debugger whenever possible to diagnose problems. I can tell you for a fact that their code was extremely buggy. It would take several hours of runtime before the bugs would propagate enough to affect the overall performance of the system.

The problem with debugging is that it can only give you information on how a program is running at an instant. That may be acceptable for a CGI that gets restarted every few minutes, however it won't help you find a creeping memory leak that appears over the course of 200 hours. Printing or logging, if done correctly, can give you information on how a program is running over days, months or years.

Holy cr@p I'm still Unemployed!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://478570]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-03-28 19:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found