s[tep]- Step in. Resume the program until next breakable point.
s[tep] <n>- Step in, resume the program at
<n>th breakable point.
- Step in, resume the program at
n[ext]- Step over. Resume the program until next line.
n[ext] <n>- Step over, same as
step <n>.
- Step over, same as
fin[ish]- Finish this frame. Resume the program until the current frame is finished.
fin[ish] <n>- Finish
<n>th frames.
- Finish
c[ontinue]- Resume the program.
q[uit]orCtrl-D- Finish debugger (with the debuggee process on non-remote debugging).
q[uit]!- Same as q[uit] but without the confirmation prompt.
kill- Stop the debuggee process with
Kernel#exit!.
- Stop the debuggee process with
kill!- Same as kill but without the confirmation prompt.
sigint- Execute SIGINT handler registered by the debuggee.
- Note that this command should be used just after stop by
SIGINT.
b[reak]- Show all breakpoints.
b[reak] <line>- Set breakpoint on
<line>at the current frame's file.
- Set breakpoint on
b[reak] <file>:<line>or<file> <line>- Set breakpoint on
<file>:<line>.
- Set breakpoint on
b[reak] <class>#<name>- Set breakpoint on the method
<class>#<name>.
- Set breakpoint on the method
b[reak] <expr>.<name>- Set breakpoint on the method
<expr>.<name>.
- Set breakpoint on the method
b[reak] ... if: <expr>- break if
<expr>is true at specified location.
- break if
b[reak] ... pre: <command>- break and run
<command>before stopping.
- break and run
b[reak] ... do: <command>- break and run
<command>, and continue.
- break and run
b[reak] ... path: <path>- break if the path matches to
<path>.<path>can be a regexp with/regexp/.
- break if the path matches to
b[reak] if: <expr>- break if:
<expr>is true at any lines. - Note that this feature is super slow.
- break if:
catch <Error>- Set breakpoint on raising
<Error>.
- Set breakpoint on raising
catch ... if: <expr>- stops only if
<expr>is true as well.
- stops only if
catch ... pre: <command>- runs
<command>before stopping.
- runs
catch ... do: <command>- stops and run
<command>, and continue.
- stops and run
catch ... path: <path>- stops if the exception is raised from a
<path>.<path>can be a regexp with/regexp/.
- stops if the exception is raised from a
watch @ivar- Stop the execution when the result of current scope's
@ivaris changed. - Note that this feature is super slow.
- Stop the execution when the result of current scope's
watch ... if: <expr>- stops only if
<expr>is true as well.
- stops only if
watch ... pre: <command>- runs
<command>before stopping.
- runs
watch ... do: <command>- stops and run
<command>, and continue.
- stops and run
watch ... path: <path>- stops if the path matches
<path>.<path>can be a regexp with/regexp/.
- stops if the path matches
del[ete]- delete all breakpoints.
del[ete] <bpnum>- delete specified breakpoint.
btorbacktrace- Show backtrace (frame) information.
bt <num>orbacktrace <num>- Only shows first
<num>frames.
- Only shows first
bt /regexp/orbacktrace /regexp/- Only shows frames with method name or location info that matches
/regexp/.
- Only shows frames with method name or location info that matches
bt <num> /regexp/orbacktrace <num> /regexp/- Only shows first
<num>frames with method name or location info that matches/regexp/.
- Only shows first
l[ist]- Show current frame's source code.
- Next
listcommand shows the successor lines.
l[ist] -- Show predecessor lines as opposed to the
listcommand.
- Show predecessor lines as opposed to the
l[ist] <start>orl[ist] <start>-<end>- Show current frame's source code from the line to if given.
edit- Open the current file on the editor (use
EDITORenvironment variable). - Note that edited file will not be reloaded.
- Open the current file on the editor (use
edit <file>- Open on the editor.
i[nfo]- Show information about current frame (local/instance variables and defined constants).
i[nfo] l[ocal[s]]- Show information about the current frame (local variables)
- It includes
selfas%selfand a return value as%return.
i[nfo] i[var[s]]ori[nfo] instance- Show information about instance variables about
self.
- Show information about instance variables about
i[nfo] c[onst[s]]ori[nfo] constant[s]- Show information about accessible constants except toplevel constants.
i[nfo] g[lobal[s]]- Show information about global variables
i[nfo] ... /regexp/- Filter the output with
/regexp/.
- Filter the output with
i[nfo] th[read[s]]- Show all threads (same as
th[read]).
- Show all threads (same as
o[utline]orls- Show you available methods, constants, local variables, and instance variables in the current scope.
o[utline] <expr>orls <expr>- Show you available methods and instance variables of the given object.
- If the object is a class/module, it also lists its constants.
display- Show display setting.
display <expr>- Show the result of
<expr>at every suspended timing.
- Show the result of
undisplay- Remove all display settings.
undisplay <displaynum>- Remove a specified display setting.
f[rame]- Show the current frame.
f[rame] <framenum>- Specify a current frame. Evaluation are run on specified frame.
up- Specify the upper frame.
down- Specify the lower frame.
p <expr>- Evaluate like
p <expr>on the current frame.
- Evaluate like
pp <expr>- Evaluate like
pp <expr>on the current frame.
- Evaluate like
eval <expr>- Evaluate
<expr>on the current frame.
- Evaluate
irb- Invoke
irbon the current frame.
- Invoke
trace- Show available tracers list.
trace line- Add a line tracer. It indicates line events.
trace call- Add a call tracer. It indicate call/return events.
trace exception- Add an exception tracer. It indicates raising exceptions.
trace object <expr>- Add an object tracer. It indicates that an object by
<expr>is passed as a parameter or a receiver on method call.
- Add an object tracer. It indicates that an object by
trace ... /regexp/- Indicates only matched events to
/regexp/.
- Indicates only matched events to
trace ... into: <file>- Save trace information into:
<file>.
- Save trace information into:
trace off <num>- Disable tracer specified by
<num>(usetracecommand to check the numbers).
- Disable tracer specified by
trace off [line|call|pass]- Disable all tracers. If
<type>is provided, disable specified type tracers.
- Disable all tracers. If
record- Show recording status.
record [on|off]- Start/Stop recording.
step back- Start replay. Step back with the last execution log.
s[tep]does stepping forward with the last log.
step reset- Stop replay .
th[read]- Show all threads.
th[read] <thnum>- Switch thread specified by
<thnum>.
- Switch thread specified by
config- Show all configuration with description.
config <name>- Show current configuration of .
config set <name> <val>orconfig <name> = <val>- Set to .
config append <name> <val>orconfig <name> << <val>- Append
<val>to<name>if it is an array.
- Append
config unset <name>- Set to default.
source <file>- Evaluate lines in
<file>as debug commands.
- Evaluate lines in
open- open debuggee port on UNIX domain socket and wait for attaching.
- Note that
opencommand is EXPERIMENTAL.
open [<host>:]<port>- open debuggee port on TCP/IP with given
[<host>:]<port>and wait for attaching.
- open debuggee port on TCP/IP with given
open vscode- open debuggee port for VSCode and launch VSCode if available.
open chrome- open debuggee port for Chrome and wait for attaching.
h[elp]- Show help for all commands.
h[elp] <command>- Show help for the given command.