Locating Code
Inside the debugger, you can extract and display parts of your program with these commands.
llLINElSUBNAMElMIN+INCRlMIN–MAXThe
lcommand lists the next few lines of your program, or the specifiedLINEif provided, or the first few lines of theSUBNAMEsubroutine or code reference.The
lMIN+INCRform listsINCR+1lines, starting atMIN. ThelMIN–MAXform lists linesMINthroughMAX.
–This command lists the previous few lines of your program.
w[LINE]Lists a window (a few lines) around the given source
LINE, or the current line if noLINEis supplied.fFILENAMEThis command lets you view a different program or
evalstatement. If theFILENAMEis not a full pathname as found in the values of%INC, it is interpreted as a regular expression to find the filename you mean./PATTERN/This command searches forward in the program for
PATTERN; the final/is optional. The entirePATTERNis optional, too; if omitted, it repeats the previous search.?PATTERN?This command searches backward for
PATTERN; the final?is optional. It repeats the previous search ifPATTERNis omitted.SSPATTERNS !PATTERNThe
Scommand lists those subroutine names matching (or, with!, those not matching)PATTERN. If noPATTERNis provided, all subroutines are listed.
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