Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 examining the Monastery: (4)
As of 2014-09-24 01:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (243 votes), past polls