Created
September 24, 2020 18:15
-
-
Save SrivastavaKshitij/4772a92def44f864356328edfc102976 to your computer and use it in GitHub Desktop.
PDB instructions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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