I'm not sure you can change the source code, but if possible, you can try:
def debugexcept(type, value, tb): if hasattr(sys, 'ps1') or not (sys.stderr.isatty() and sys.stdin.isatty()) or type == SyntaxError: sys.__excepthook__(type, value, tb) else: import traceback, pdb traceback.print_exception(type, value, tb) print pdb.pm() sys.excepthook = debugexcept
If you run your python program from the command line, you should be flushed to the python debugger when it dies, assuming something "bad" happened, throws an exception. I assume that stderr / stdout were captured and you do not see any exception?
those. look for something like:
sys.stdout = open('stdout.log', 'w') sys.stderr = open('stderr.log', 'w')
If a process dies without any exception, it can be harder to find. One (very difficult way) in the windows will use something like windbg to join the process and set a breakpoint in the CRT in some appropriate place.
Good luck
CarlS
source share