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:\>