Hello all,
I've been using the Perl debugger (perl -d) more and more lately, especially running it on test files to exercise modules. I often want to set a breakpoint in a file other than the current one, but I can't seem to figure that out.
Any suggestions?
To clarify, suppose I have a test script try_it.pl, that calls methods in a OOP module Fragile, which in turn calls methods in Broken::Completely. When I run perl -d try_it.pl, I can step line by line, and set breakpoints by specifying a line within the current file (using b 123 for line 123), but I have to wait until I step into Fragile, and then step into Broken/Completely before setting a breakpoint in that file. I thus end up usually running the file at least twice - one pass just to set breakpoints, then restart using 'R', then run to next breakpoint using 'c'. Is there a better way?
Thanks,
Clinton
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.