[wingide-users] Better debugging with `futures`

Wing IDE Support support at wingware.com
Mon Aug 23 08:23:08 MDT 2010

On 8/21/10 11:26 AM, cool-RR wrote:
> It would be nice if Wing would pause when the thread gets the original
> exception, before it gets caught. If I understand correctly, this is
> what Wing currently does with wxPython when there's an exception in an
> event handler, so it'd be nice if it would do it for `futures` too.

The issue here is that the exception isn't being "printed" (actually 
passed to a exception hook), instead it's being saved for later 
processing.  We'll try to add better support for situations like this in 
the future.  In the meantime, you can insert something like the 
following to call the exception hook where you'd like Wing to stop:

except Exception:
     # XXX Show exception in Wing IDE if running in debugger
     if __debug__ and 'WINGDB_ACTIVE' in os.environ:
         etype, evalue, tb = sys.exc_info()
         sys.excepthook(etype, evalue, tb)



More information about the wingide-users mailing list