Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: I never use the debugger.

by Tanktalus (Canon)
on Jul 27, 2005 at 14:28 UTC ( [id://478613]=note: print w/replies, xml ) Need Help??


in reply to Re: I never use the debugger.
in thread I never use the debugger.

I take great offense to your insulting generalisation. I use the debugger all the time, in addition to significant amounts of tracing. And, unless you're willing to back up your assertion that since I need the "advanced" debugging tool, I must be stupid, I'd really appreciate it if you'd strike that out of your original post.

I find the debugger, even the text debugger, invaluable. Mainly because I can much more quickly find my problems than with print or logging (which I use as well). The print statements can help me narrow down a problem, but once I get to a certain point, I find it way faster just to set a breakpoint, continue to that point, and then I can look at variables, object method output, stack traces, etc., really quickly. I don't always know what I'm looking for when I get there, but I know I'll be able to query anything I need at that point. I can even run perl code (object methods, for example).

The problem with print, for me, is that I need to know what to look for before I get there. And since some of my perl code literally takes hours to complete, if I'm debugging something near the end, I want to get there as few times as possible.

I've also devised some infrastructure that allows me to bypass unneeded portions of the code - but it still can take 10 or 20 minutes to reach the point I'm debugging. Adding another 10 or 20 minutes each time I think I need more information is actually painfully slow, whereas with the debugger it'll take me 30 minutes to get there once (debugger is slower than regular code), and I usually don't need to go in a second time.

To me, there are some similarities between goto and the debugger. You need to really understand the breadth of the debugging tools to be able to use the right tool for the right job. When you understand how to use the debugger, it can be powerful. But when all you have are print statements for debugging, everything looks like a variable - you may get the job done, but it may have been faster/easier if you used the debugger.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-24 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found