When you type commands into the debugger, you don’t need to terminate them with a semicolon. Use a backslash to continue lines (but only in the debugger).
Since the debugger uses
eval to execute
local settings will disappear once the command
returns. If a debugger command coincides with some function in your own
program, simply precede the function call with anything that doesn’t look
like a debugger command, such as a leading
; or a
If the output of a debugger built-in command scrolls past your screen, just precede the command with a leading pipe symbol so it’s run through your pager:
The debugger has plenty of commands, and we divide them (somewhat arbitrarily) into stepping and running, breakpoints, tracing, display, locating code, automatic command execution, and, of course, miscellaneous.
Perhaps the most important command is
h, which provides help. If you type
h h at the debugger prompt, you’ll get a compact
help listing designed to fit on one screen. If you type
COMMAND, you’ll get
help on that debugger command.
Stepping and Running
The debugger operates by stepping through your program line by line. The following commands let you control what you skip over and where you stop.
sdebugger command single-steps through the program. That is, the debugger will execute the next line of your program until another statement is reached, descending into subroutine calls as necessary. If the next line to execute involves a function ...