Skip to content

Instantly share code, notes, and snippets.

@ultrafunkamsterdam
Created August 27, 2024 09:47
Show Gist options
  • Save ultrafunkamsterdam/f19049d39b92d52c1ab32bfb02c78e80 to your computer and use it in GitHub Desktop.
Save ultrafunkamsterdam/f19049d39b92d52c1ab32bfb02c78e80 to your computer and use it in GitHub Desktop.
Python breakpoint using Ipython debugger
# this makes debugging such a breeze with autocomplete available and such.
# requires ipython to be installed of course : pip install IPython
def breakpoint():
"""breakpoint() replacement, which uses IPython instead of plain pdb"""
import sys
from IPython.terminal.debugger import set_trace
set_trace(sys._getframe(1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment