in reply to Int-3 equivalent?
You can get the desired behaviour as follows. Set perldb.ini as follows (in the current dir):
C:\>type perldb.ini $ENV{PERLDB_OPTS}="NonStop frame=2";
Because perl5db.pl (the debugger in X:\\Perl\lib\perl5db.pl on Win32) is Unix centric it will refuse to read this file due to permissions being too open. A quick patch is to skip the is_safe_file() test on Win32 circa line 317 with something like:
unless (is_safe_file($file) or $^O =~ m/Win32/ ) {
There are other options to set the NonStop feature (ie .perldb and set PERLDB_OPTS env var) but that was the only one that worked (after the patch) on Win32 and I was too lazy to debug the debugger any deeper. Anyway here is an example that happily flips into and out of the interactive debugger:
C:\>type test.pl print "Hello\n"; print "World!\n"; assert( 1 == 0 ); print "In interactive Debugger!\n"; $a = "Still in debugger!\n"; print $a; assert( 1 == 1 ); print "Escaped Debugger!\n"; print "Still Free!\n"; assert( 0 ); print "Debugger again!\n"; sub assert { $DB::single = $_[0] ? 0 : 1 } C:\>perl test.pl Hello World! In interactive Debugger! Still in debugger! Escaped Debugger! Still Free! Debugger again! C:\>perl -d test.pl Default die handler restored. Package test.pl. Hello World! entering main::assert exited main::assert 4: print "In interactive Debugger!\n"; DB<1> n In interactive Debugger! 5: $a = "Still in debugger!\n"; DB<1> n 6: print $a; DB<1> n Still in debugger! 7: assert( 1 == 1 ); DB<1> c entering main::assert exited main::assert Escaped Debugger! Still Free! entering main::assert exited main::assert 11: print "Debugger again!\n"; DB<1> c Debugger again! Debugged program terminated. Use q to quit or R to restart, use O inhibit_exit to avoid stopping after program termination, h q, h R or h O to get additional info. DB<1> q C:\>
cheers
tachyon
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Int-3 equivalent?
by sfink (Deacon) on Jun 10, 2004 at 06:51 UTC | |
|
Re^2: Int-3 equivalent?
by BrowserUk (Patriarch) on Jun 10, 2004 at 01:45 UTC | |
|
Re^2: Int-3 equivalent?
by toma (Vicar) on Jun 10, 2004 at 07:11 UTC | |
|
Re^2: Int-3 equivalent?
by dfaure (Chaplain) on Jun 10, 2004 at 06:42 UTC | |
|
Re^2: Int-3 equivalent?
by bmann (Priest) on Jun 10, 2004 at 07:08 UTC |