Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2014-11-28 19:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (200 votes), past polls