Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Using the perl debugger

by almut (Canon)
on Mar 15, 2009 at 12:21 UTC ( [id://750723]=note: print w/replies, xml ) Need Help??


in reply to Re: Using the perl debugger
in thread Using the perl debugger

use {{ ... effectively turning the line in the next debugger step into a comment.

I don't think this has the desired effect of commenting out the lines. Rather, it runs the debugger command "#" (which does nothing of interest) before running the line itself. Even if you'd use pre-Perl actions (i.e. <), they would still be executed separately, rather than being textually merged with the line(s) in question (as would be required to comment out).

Try skipping over the $i++, for example... the subsequent print " $i\n" will still print the incremented value (e.g. 3, not 2, on the first iteration).

An example application of pre-debugger commands would be setting "{ l" to get a listing of the next few lines on every prompt.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2025-02-09 16:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (96 votes). Check out past polls.