Last active
July 16, 2023 05:09
-
-
Save nachmore/115505f5f9bc39e295ed25beceeeb7bd to your computer and use it in GitHub Desktop.
Create an interactive Python shell at a specific line
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
import pdb | |
pdb.set_trace | |
# b: set a breakpoint | |
# c: continue debugging until you hit a breakpoint | |
# s: step through the code | |
# n: to go to next line of code | |
# l: list source code for the current file (default: 11 lines including the line being executed) | |
# u: navigate up a stack frame | |
# d: navigate down a stack frame | |
# p: to print the value of an expression in the current context | |
# p dir(obj): dump all attributes of an object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment