update: made it pass args to oldWarn/oldDie
# Stop on warn (sow) $DB::oldWarn = $SIG{__WARN__}; $DB::alias{sow} = 's/^sow/\$SIG{__WARN__} = sub { \$DB::oldWarn->(@_) +if (\$DB::oldWarn); \$DB::single = 1 }/'; # Stop on die (sod) $DB::oldDie = $SIG{__DIE__}; $DB::alias{sod} = 's/^sod/\$SIG{__DIE__} = sub { \$DB::oldDie->(@_) if + (\$DB::oldDie); \$DB::single = 1 }/';
In reply to Breakpoint on warn or die in the debugger by bikeNomad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |