in reply to Re: Perl Debugger: setting a breakpoint in another file with 'b'
in thread Perl Debugger: setting a breakpoint in another file with 'b'

no book needed :)

lanx@lanx-1005HA:~$ perl -de0 Loading DB routines from perl5db.pl version 1.33 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(-e:1): 0 DB<1> h b b Sets breakpoint on current line) b [line] [condition] Set breakpoint; line defaults to the current execution line; condition breaks if it evaluates to true, defaults to '1'. b subname [condition] Set breakpoint at first line of subroutine. b $var Set breakpoint at first line of subroutine referenced by + $var. b load filename Set breakpoint on 'require'ing the given file. b postpone subname [condition] Set breakpoint at first line of subroutine after it is compiled. b compile subname Stop after the subroutine is compiled. DB<2>

see also perldebug

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

  • Comment on Re^2: Perl Debugger: setting a breakpoint in another file with 'b'
  • Download Code

Replies are listed 'Best First'.
Re^3: Perl Debugger: setting a breakpoint in another file with 'b'
by Dumu (Monk) on May 18, 2015 at 13:53 UTC

    Incidentally, I realised last night that you can even start a Perl debugger REPL using a divide by zero:

    perl -de1/0

    And it still works (i.e. starts the debugger and puts you into a "Perl shell"), although you do get an 'Illegal division by zero' error if you then execute any of the 'stepping' commands.

    So I wonder if there is anything you can put after perl -de that won't let the debugger start?

Re^3: Perl Debugger: setting a breakpoint in another file with 'b'
by Dumu (Monk) on May 18, 2015 at 13:49 UTC

    Danke sehr, Rolf... I had not tried 'b postpone', only 'b compile' and 'b load', which hadn't apparently worked. I shall try 'b postpone'!

    It was staring me in the face the whole time.