Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: I never use the debugger.

by duff (Parson)
on Jul 27, 2005 at 06:24 UTC ( [id://478482]=note: print w/replies, xml ) Need Help??


in reply to I never use the debugger.

I've used Perl for about 13 years and I've never needed the debugger. I've always solved problems through some combination of print statements and reasoning. I've used C for nigh on 20 years now and I've had similar experience there as well. I've used gdb maybe 3 times in the last 15 years.

I tend to think that it's experience in tracking down mysterious pointer problems that has prevented me from using the debugger so much in C and the translation of that skill (or intuition) to perl that has made me never use the Perl debugger. It's also that I've mostly used Perl "at the surface" rather than delving deep into its innards.

Replies are listed 'Best First'.
Re^2: I never use the debugger.
by hv (Prior) on Jul 27, 2005 at 08:23 UTC

    Interesting, I'm halfway between - I never use the perl debugger, but I use gdb extensively for debugging C programs (often perl itself).

    One difference is that when I'm looking at C code it's far more likely to be written by someone else, but I still use gdb for my own C code, and print statements for the rare occasions I'm looking into someone else's perl code.

    Another part of it is that I tend to find bugs in tools: I got into the habit of using a debugger for C programs to show me the assembler code for each statement, because one of the first C compilers I used had a lot of code generation bugs. When I encounter or suspect a bug in perl, again it's the C-level debugger I turn to, this time because I actually have the opportunity to fix the bug myself.

    Conversely, if I were to encounter a bug in gcc code generation and felt brave enough to try and fix it myself, I'd probably use both gdb and sprinkled prints to help me understand the flow.

    Hugo

Log In?
Username:
Password:

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

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

    No recent polls found