This is a question I have wondered about for quite some time, yet I have never found a suitable solution. If I run a script and I come across, let\'s say an IndexError, pyth
Put a breakpoint inside the constructor of topmost exception class in the hierarchy, and most of the times you will see where the error was raised.
Putting a breakpoint means whatever you want it to mean : you can use an IDE, or pdb.set_trace, or whatever
pdb.set_trace