Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: debugging trick of the week: fatal warnings

by stephen (Priest)
on Apr 26, 2002 at 03:40 UTC ( #162168=note: print w/ replies, xml ) Need Help??


in reply to Re: debugging trick of the week: fatal warnings
in thread debugging trick of the week: fatal warnings

If you want warnings to stop your debugger if it's running, but not to actually die, this seems to work:

$SIG{'__WARN__'} = sub { warn $_[0]; $DB::single = $DB::single; $DB::s +ingle = 1; };
It automatically slams the debugger into single-step mode every time there's a warning. (The $DB::single = $DB::single is just to keep -w happy.)

stephen


Comment on Re: Re: debugging trick of the week: fatal warnings
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2014-08-29 12:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (280 votes), past polls