Cheatsheet
Starting Byebug
byebug if foo == “bar”Stopping Again
q[uit] — a.k.a. “exit” unconditionally
kill
Essential Commands
c[ontinue] <line_number>
n[ext] <number>
s[tep] <number>
b[ack]t[race] — a.k.a. “w[here]”
h[elp] <command_name>
Breakpoints and Catchpoints
b[reak]
b[reak] <filename>:<line_number>
b[reak] <class>(.|#)<method>
info breakpoints
cond[ition] <number> <expression>
del[ete] <number>
disable breakpoints <number>
cat[ch] exception> off
cat[ch]
cat[ch] off
sk[ip]
Program Stack
b[ack]t[race] — a.k.a. “w[here]”
f[rame] <frame_number>
up <number>
down <number>
info args
info locals
info instance_variables
info global_variables
info variables
m[ethod] <class|module>
m[ethod] i[nstance] <object>
m[ethod] iv <object>
v[ar] cl[ass]
v[ar] co[nst] <object>
v[ar] g[lobal]
v[ar] i[nstance] <object>
v[ar] l[ocal]
Execution Control
c[ontinue] <line_number>
n[ext] <number>
s[tep] <number>
fin[ish] <num_frames>
irb
restart
Threads
th[read]
th[read] l[ist]
th[read] stop <number>
th[read] resume <number>
th[read] <number>
Display
e[val] — a.k.a. “p” <expression>
pp
putl
ps
disp[lay] <expression>
info display
undisp[lay] <number>
disable display <number>
enable display <number>
Controlling Byebug
hist[ory] <num_commands>
save <file>
source <file>
set <option>
show <option>
Source Files and Code
reload
info file
info files
info line
l[ist]
l[ist] –
l[ist] =
l[ist] <first>-<list>
edit <file:line_no>
Last updated