Dropping in a import pdb; pdb.set_trace() in my pytests and running them from the terminal has helped me squash some pretty difficult bugs. It’s dead simple (same with Ruby pry)
I also wanna give a shout out to pudb, for those who want a more visual experience. It uses curses to offer a GUI-like debugging experience while on the terminal. Real nice piece of software.
Now that I think about it I bet you could attach pdb to a process running the python interpreter and find your way to the right level of abstraction. Does not sound practical though