in reply to Re: Using the Perl Debugger (-d)
in thread Using the Perl Debugger (-d)

osunderdog,

    I would distinguish debugging from logging.

That's not strictly true.  I often encounter problems that are best debugged by doing logging.

One example is if I'm tracking data during CGI script processing.  It wouldn't be appropriate to display the results to the generated HTML page, but adding a simple mechanism to log the results, behind-the-scenes, can be a lifesaver.

So "logging" in the sense that I'm using it is merely another way of saying "writing data to a logfile".

Update:  osunderdog, your good points (below) are well-taken.  I was mainly clarifying my slightly different usage of the word "logging".  Simply put, logging data to a file can be an aid to debugging.  But I see your distinction between the interaction you get with a debugger vs. the "post-mortem" aspect of perusing a logfile, after the fact.


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re^3: Using the Perl Debugger (-d)
by osunderdog (Deacon) on Jan 25, 2007 at 16:05 UTC

    Ok, let me see if I can explain myself without digging a hole.

    Sure! debugging and logging are the Yin and Yang of software diagnosis.

    I guess I was distinguishing the two using interactivity as criteria. In terms of interactivity, I would consider debugging and logging as separate. Debugging allows a developer to interrogate and modify variables during runtime. Logging, on the other hand, is the passive collection of what has happened during runtime.

    I once had a Tool Vendor argue with me that logging was inappropriate for software development. His argument was that it was never introduced as a topic of discussion in college.

    Hazah! I'm Employed!