Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Specifying a Filename in a Breakpoint in the Perl Debugger

by clwolfe (Scribe)
on Jan 27, 2009 at 03:55 UTC ( #739097=note: print w/ replies, xml ) Need Help??


in reply to Specifying a Filename in a Breakpoint in the Perl Debugger

And now to answer my own question...

Turns out the 'f' command will help. The 'h' docs says that it let you view the code in another file, but in fact it switches your whole context to the other files (not the execution point, of course). You can then easily say 'b 1024' or whatever to set a breakpoint at a particular line, then switch back using 'f' again.

So, in my example above, I might run the debugger on try_it.pl, then immediately type f lib/Broken/Completely, then b 1234 to set a breakpoint at line 1234, then switch back to try_it.pl with f try_it.pl.


Comment on Re: Specifying a Filename in a Breakpoint in the Perl Debugger
Select or Download Code
Re^2: Specifying a Filename in a Breakpoint in the Perl Debugger
by perlyogi (Acolyte) on Sep 04, 2011 at 06:49 UTC
    Thanks clwolfe, that was a very useful piece of information
Re^2: Specifying a Filename in a Breakpoint in the Perl Debugger
by Anonymous Monk on May 24, 2013 at 10:16 UTC

    Thanks clwolfe. It works perfectly.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://739097]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2014-12-21 03:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (102 votes), past polls