Skip to content

Instantly share code, notes, and snippets.

@SrivastavaKshitij
Created September 24, 2020 18:15
Show Gist options
  • Save SrivastavaKshitij/4772a92def44f864356328edfc102976 to your computer and use it in GitHub Desktop.
Save SrivastavaKshitij/4772a92def44f864356328edfc102976 to your computer and use it in GitHub Desktop.
PDB instructions
There are two ways of invoking pdb
python -m pdb <application>; Then set the breakpoint b <lineno> ; then run c
write import pdb; pdb.set_trace() where you want the debugger to stop and just run python <applicatio> ; pdb will stop at that line
common commands are
a. w (where) to get stack trace
b. c (continue) - it will run the app until the next breakpoint
c. n (next) - will execute the current line and move to the next
d. s (step) - will step into the current line if its a function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment