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


In reply to Re: Int-3 equivalent? by tachyon
in thread Int-3 equivalent? by BrowserUk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.