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

Re: Using the Perl Debugger (-d)

by osunderdog (Deacon)
on Jan 25, 2007 at 13:51 UTC ( [id://596477]=note: print w/replies, xml ) Need Help??

in reply to Using the Perl Debugger (-d)

I would distinguish debugging from logging. Another peaceful monk has clarified logging. (gaal)

I find debugging extremely useful for understanding perl behavior. Here is a link to another thread on this subject that I started a while back: Neat Debugger tricks

Hazah! I'm Employed!

Replies are listed 'Best First'.
Re^2: Using the Perl Debugger (-d)
by liverpole (Monsignor) on Jan 25, 2007 at 14:24 UTC

        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.


      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!

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-06-24 22:17 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.