Python breakpoint() built-in function
From the Python 3 documentation
This function drops you into the debugger at the call site [...].
Python breakpoint() calls Python debugger at a given line
Example
>>> # Create a loop over 5 integers
>>> for i in range(5):
... # Stream i to stdout
... print(i)
... # Create breakpoint at # 3
... if i == 3:
... breakpoint()
...
# 0
# 1
# 2
# 3
# > c:\users\user\path\to\your\project\example.py(24)<module>()
# -> for i in range(5):
# (Pdb)