Useful GDB and PDB Commands
gdb --arg python demo.py 2>&1 | tee demo.log
Shortcuts:
q
quit
h
help
b
break, example: b 5
h command
print command meaning
disable codenum
enable codenum
condition codenum xxx
set break condition
c
continue
n
next
s
step
w
print code in current execution point
j codenum
jump to line j
l
list nearby code
p
print var value
a
print current func/var value
Enter repeat last command