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