Hi! Please consider following me on twitter: @hanekomu.
2008年04月17日
Perl debugger plugins with DB::Pluggable
I've released DB::Pluggable which adds plugin support to
the debugger. There are quite a few good ~/.perldb ideas around,
but they're not easy to combine because they often overwrite the same
DB::* functions. This distribution tries to remedy this by moving
functionality to plugins.
$ cat ~/.perldb
use DB::Pluggable;
use YAML;
$DB::PluginHandler = DB::Pluggable->new(config => Load <<EOYAML);
global:
log:
level: error
plugins:
- module: BreakOnTestNumber
EOYAML
$DB::PluginHandler->run;
$ perl -d foo.pl
Loading DB routines from perl5db.pl version 1.28
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
1..9
...
DB<1> b #5
DB<2> r
DB::Pluggable was inspired by Andy Armstrong's journal entry about a debugger command that adds breakpoints for specific Test::Builder-based tests.
This distribution is very much in beta, so it's more like a proof of concept. Therefore, not all hooks imaginable have been added, only the ones to make this demo work. If you want more hooks or if the current hooks don't work for you, let me know.
posted at: 11:45 | path: /dev | permalink | 0 comments | 0 trackbacks
Comments are closed for this story.
Trackbacks are closed for this story.