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
You can put this line in your code:
import pdb ; pdb.set_trace()
More info: Start the python debugger at any line