Table 18-1. Debugger basics
Debugging task | Debugger command |
---|
To run a program under the debugger | > perl -dprogram.pl |
To set a breakpoint at the current line | DB<1> b |
To set a breakpoint at line 42 | DB<1> b 42 |
To continue executing until the next break-point is reached | DB<1> c |
To continue executing until line 86 | DB<1> c 86 |
To continue executing until subroutine foo is called | DB<1>c foo |
To execute the next statement | DB<1> n |
To step into any s ubroutine call that's part of the next statement | DB<1> s |
To run until the current subroutine r eturns | DB<1> r |
To examine the contents of a variable | DB<1> x $variable |
To have the debugger watch a variable or expression, and inform you whenever it changes | DB<1>w$variableDB<1> wexpr($ess)*$ion |
To view where you are in the source code | DB<1> v |
To view line 99 of the source code | DB<1> v 99 |
To get helpful hints on the many other features of the debugger | DB<1> |h h |