If you didn't start your program inside a Python interpreter shell,
there you can still get into the debugger when an exception
occurs. Here you need to arrange for this possibility adding to the
script these lines: