Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Neat Debugger tricks (using the debugger to write tests)

by Ovid (Cardinal)
on Nov 16, 2005 at 19:53 UTC ( #509171=note: print w/replies, xml ) Need Help??

in reply to Neat Debugger tricks

If you really want to learn some awesome debugging tricks, check out this lazy testing presentation. The author explains a bit about how the debugger works internally and then shows how you run tests inside of the debugger and have a new test script written when you're done. It's very impressive.

You can also script a debugging session. From perldebug:

You can mock TTY input to debugger by adding arbitrary commands to @DB::typeahead. For example, your .perldb file might contain

  sub afterinit { push @DB::typeahead, "b 4", "b 6"; }

Which would attempt to set breakpoints on lines 4 and 6 immediately after debugger initilization. Note that @DB::typeahead is not a supported interface and is subject to change in future releases.


New address of my CGI Course.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2020-09-25 08:07 GMT
Find Nodes?
    Voting Booth?
    If at first I donít succeed, I Ö

    Results (136 votes). Check out past polls.