Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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

by Ovid (Cardinal)
on Nov 16, 2005 at 19:53 UTC ( [id://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.

Cheers,
Ovid

New address of my CGI Course.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2025-07-13 04:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.