Brethren and Sistren

I am a big fan of the Perl Debugger, perl5dp.pl (aka perl -d) and would like to make the most of its many capabilities. I would really like to be able to utilise the debugger's ability to set a breakpoint at a line in a file other than the one you start off in. E.g.:

b lib/UsefulModule.pm:124
As this would mean I could jump to wherever I want in any module I'm using.

The trouble is, whatever line I set, I always get the same message:

Line 124 of 'lib/UsefulModule.pm' not breakable.

Yes, these are lines that should be breakable and indeed are when I step through the code to reach them in another way, with colons on the left and everything. I have never managed to break any line in any module with this functionality as I remember.

Breakpointing in the same module using the 'breakpoint at the start of a sub' functionality works just fine.

b UsefulModule::do_stuff
I even get auto-complete on the subroutines in the module when I type:
b UsefulModule::
and/or the first letter / couple of letters of the sub. This is great, but means an extra step if I want to stop in the middle of a sub.

For one thing, I wanted to check that this isn't a bug in the debugger. (A classic but inevitable paradox). Has anyone else used this functionality recently, or indeed ever?

I just had a look at the debugger source but I can't see anything obvious that I could be running aground on. (The relevant area seems to be around &break_on_filename_line: breakpoint-related subs are above and below this line.) But then, the debugger code is some of the most legendarily dense Perl there is.

Thanks in advance for your responses.


In reply to Perl Debugger: setting a breakpoint in another file with 'b' by Dumu

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.