PDB Note

w(here) = print stack trace

d(own) = move down a frame

u(p) = move up a frame

b = list all breakpoints

b fileName:55 = set breakpoint in file fileName at line 55

b fileName:my_func

b 55, where a == 6

tbreak = temporary breakpoint = removed when first hit

c(lear) = clear all breakpoints

c fileName:lineNum = clear that line’s breakpoint

enable bnumber

disable bnumber

Movement

s(tep)

n(ext)

j(ump) # = jump to that line

unt(il) line#

r(eturn) = until current frame exits

c(ontinue) = until you hit a breakpoint

pdb.set_trace() = your code can break into the pdb

Leave a Reply

Your email address will not be published. Required fields are marked *