in reply to Re^2: Make debugger break on source lines matching a pattern
in thread Make debugger break on source lines matching a pattern
DB<100> w $main::{"_<".(caller 3)[1]}[(caller 3)[2]] =~ /\bprint\b/ DB<101> r 0 1 Watchpoint 0: $main::{"_<".(caller 3)[1]}[(caller 3)[2]] =~ /\bprin +t\b/ changed: old value: '' new value: '1' main::(tst.pl:13): print $x++;
my suggestion is to define a new debugger command for "global-break-line" via an alias like bl in your '.perldb'.
Like that bl REGEX is translated to w @{ [ DB::breakline(regex) ] }
sub DB::breakline { } is also defined in '.perldb' and handles the details to access the line's source and to return a new value.
tomorrow more!
Cheers Rolf
( addicted to the Perl Programming Language)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Make debugger break on source lines matching a pattern
by Yary (Pilgrim) on Jan 12, 2014 at 00:41 UTC | |
by LanX (Saint) on Jan 12, 2014 at 11:40 UTC |