Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^4: I usually debug via...

by ff (Hermit)
on Feb 15, 2005 at 22:22 UTC ( [id://431359]=note: print w/replies, xml ) Need Help??


in reply to Re^3: I usually debug via...
in thread I usually debug via...

Generally a good approach, except that my programs are large and that could turn on hundreds of warnings. For me, I generally just need to turn on a few warnings at any given time and it's no big deal to hop around to those four or five that I've unmasked to comment them back up.

Replies are listed 'Best First'.
Re: I usually debug via...
by jonadab (Parson) on Feb 20, 2005 at 18:16 UTC

    My code is usually littered with stuff like print "Foo: ".Dumper(\$foo) if $debug>7;

    Often I write those in not knowing if I'll ever want that level of verbosity; usually I never have to crank $debug higher than 2 or 3. (1 just prints progress info usually, depending on what the app is; 2 gives more detail, and so on. 0 only prints actual errors, and undef suppresses non-fatal errors. Anything past 5 is dumping lots of big data structures.) Occasionally I do end up cranking it way up, though, and adding in extra print statements like the above, that I didn't originally anticipate needing.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-03-29 12:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found