in reply to Basic debugging checklist
To let the debugger do this automatically I use a debugger customization script:
Save the content to file .perldb (or perldb.ini on Windows) and place it in the current or in your HOME directory. The subroutine will be called initially by the debugger and installs a signal handler for all warnings. If the format matches one from the perl core, execution in the debugger is paused by setting $DB::single = 1.sub afterinit { $::SIG{'__WARN__'} = sub { my $warning = shift; if ( $warning =~ m{\s at \s \S+ \s line \s \d+ \. $}xms ) { $DB::single = 1; # debugger stops here automatically } warn $warning; }; print "sigwarn handler installed!\n"; return; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Basic debugging checklist
by LanX (Saint) on Jun 21, 2014 at 12:30 UTC |