til/python/debugging.md at main · cheginit/til · GitHub
Skip to content

Latest commit

 

History

History
7 lines (6 loc) · 383 Bytes

File metadata and controls

7 lines (6 loc) · 383 Bytes

Adding breakpoints for debugging

Python 3.7+ provides a convenient way for adding breakpoints without importing pdb explicitly. You can just add breakpoint(), a Python built-in function, and it automatically drops you to debug mode. Under the hood, it calls sys.breakpointhook(). You can more information here.