Skip to content

Instantly share code, notes, and snippets.

Last active September 2, 2023 06:43
Star You must be signed in to star a gist
What would you like to do?
python "breakpoint" (more or less equivalent to ruby's binding.pry); for a proper debugger, use
import code; code.interact(local=dict(globals(), **locals()))
Copy link

charterchap commented Sep 3, 2021

def pry():
    import inspect
    frame = inspect.currentframe().f_back
        import code; 
        code.interact(local=dict(frame.f_globals, **frame.f_locals))
        del frame

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment