http://www.perlmonks.org?node_id=509331


in reply to Neat Debugger tricks

Something that's missing in the debugger is "set next statement", something that some c and Java debuggers have. And differential compilation, but that's probably even more difficult. Eg.

# ... 107 sub foo { 108 my $x; 109 $x = 43; 110 => die "invalid x!" unless $x == 42; 111 print "Yay!" 112 # ...

At this point, I notice I have a bug so I edit line 109 (the source code on disk changes):

109 $x = 43; # When I hit "save", foo is recompiled. If line numbers # have changed, breakpoints are updated.

And set the next instruction to it again. Then I hit s/n/c/whatever and keep going.