Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Neat Debugger tricks

by graff (Chancellor)
on Nov 17, 2005 at 01:50 UTC ( #509262=note: print w/ replies, xml ) Need Help??


in reply to Neat Debugger tricks

When I set a break point inside a loop and I want to track the value of one or more variables at each iteration, I find it saves a lot of time/tedium to use "< expression" -- like so:

DB<1> b 123 DB<2> < print "## $var1 ## $var2 ## $whatever ##\n" DB<3> c 123: some_line_of_code(); ## var1_value ## thisisvar2 ## and so on ## DB<4>
Naturally, you could put "print Dumper($whatever)" as well, or any other operation that might speed up the debugging inside a loop.


Comment on Re: Neat Debugger tricks
Download Code
Re^2: Neat Debugger tricks
by diotalevi (Canon) on Nov 17, 2005 at 02:47 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2015-07-01 22:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (24 votes), past polls