Breakpoints
bbLINEbCONDITIONbLINECONDITIONbSUBNAMEbSUBNAMECONDITIONb postponeSUBNAMEb postponeSUBNAMECONDITIONb compileSUBNAMEb loadFILENAMEThe
bdebugger command sets a breakpoint beforeLINE, telling the debugger to stop the program at that point so that you can poke around. IfLINEis omitted, it sets a breakpoint on the line that’s about to execute. IfCONDITIONis specified, it’s evaluated each time the statement is reached: a breakpoint is triggered only ifCONDITIONis true. Breakpoints may only be set on lines that begin an executable statement. Note that conditions don’t useif:b 237 $x > 30 b 237 ++$count237 < 11 b 33 /pattern/i
The
bSUBNAMEform sets a (possibly conditional) breakpoint before the first line of the named subroutine.SUBNAMEmay be a variable containing a code reference; if so,CONDITIONis not supported.There are several ways to set a breakpoint on code that hasn’t even been compiled yet. The
b postponeform sets a (possibly conditional) breakpoint at the first line ofSUBNAMEafter it is compiled.The
b compileform sets a breakpoint on the first statement to be executed afterSUBNAMEis compiled. Note that, unlike thepostponeform, this statement is outside the subroutine in question because the subroutine hasn’t been called yet, only compiled.The
b loadform sets a breakpoint on the first executed line of the file. TheFILENAMEshould be a full pathname as found in the%INCvalues.ddLINEThis command deletes the breakpoint at
LINE; if omitted, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access