Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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

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 having an uproarious good time at the Monastery: (8)
As of 2016-08-26 07:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (366 votes). Check out past polls.