use strict;
use warnings;
$|=1; # disable buffering
my $a;
our $y;
for (0..10) {
print;
$a++;
$y++;
}
####
DB<71> h a
a [line] command
Set an action to be done before the line is executed;
line defaults to the current execution line.
Sequence is: check for breakpoint/watchpoint, print line
if necessary, do action, prompt user if necessary,
execute line.
a Does nothing
####
DB<72> a 10 if($y>3 and $y <7) { print "\n\n" }
DB<73> L
d:/Users/RolfLangsdorf/AppData/Roaming/pm/tst_debuger.pl:
10: print;
action: if($y>3 and $y <7) { print "\n\n" }
DB<73> c
0123
4
5
678910
DB<74>
####
DB<79> h w
w expr Add a global watch-expression.
w Does nothing
####
DB<81> L
DB<81> w if ($a>3 and $a <7){ $a }
DB<82> c
0123Watchpoint 0: if ($a>3 and $a <7){ $a } changed:
old value: ''
new value: '4'
DB<82> c
4Watchpoint 0: if ($a>3 and $a <7){ $a } changed:
old value: '4'
new value: '5'
DB<82>
DB<82> c
5Watchpoint 0: if ($a>3 and $a <7){ $a } changed:
old value: '5'
new value: '6'
DB<82> c
6Watchpoint 0: if ($a>3 and $a <7){ $a } changed:
old value: '6'
new value: ''
DB<82> c
78910 DB<82>
####
DB<78> w if ($a>3 and $a <7){ print "\n$DB::line\n" }
DB<79> L
Watch-expressions:
if ($a>3 and $a <7){ print "\n$DB::line\n" }
DB<79> c
0123
12
Watchpoint 0: if ($a>3 and $a <7){ print "\n$DB::line\n" } changed:
old value: ''
new value: '1'
DB<79> c
10
4
11
12
10
5
11
12
10
6
11
Watchpoint 0: if ($a>3 and $a <7){ print "\n$DB::line\n" } changed:
old value: '1'
new value: ''