import pdb def jump_from_exception_event(): lineno = 4 1 / 0 pdb.Pdb().set_trace() jump_from_exception_event()