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:
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.)$SIG{'__WARN__'} = sub { warn $_[0]; $DB::single = $DB::single; $DB::s +ingle = 1; };
stephen
|
---|
In Section
Meditations