Traceback is printed to Debug I/O window after exception reported.

3 months ago by
Debugger:Exception settings are
Report Exceptions: When Printed
Report Logged Exceptions In When Printed Mode: True

In my exception handler I am logging the exception with logging.exception(...) so the debugger stops at the logging statement (as expected) and the logging output has been displayed in the Debug I/O window. The Exceptions toolbox window also shows a stack trace which is navigable by clicking (really nice by the way).
The problem is that when I continue *another* stack trace is printed to the Debug I/O window. This behavior is different than what I would see on stderr when running the code from a console.
Behavior remains even if I ignore this exception location from the Exceptions tool.

Wing version 5.1.12 (I plan on upgrading soon)
Python 2.7.14
Windows 10

Community: Wing Python IDE

2 Answers

3 months ago by
I'm seeing this also.  I think we must be printing it again from the debugger code that handles this case, but I'm not sure yet.  We'll try to fix this soon.  Thanks for reporting this problem!
We've issued a patch for Wing 6.0.12 that fixes this.  You can get it with Check for Updates from the Help menu.  The issue was that we were calling the sys.excepthook incorrectly during handling of logging.error.  This is relatively harmless with the default sys.excepthook but could be bad in code that sets a custom excepthook, so patching it seemed best.  Thanks again for reporting this!
written 3 months ago by Wingware Support  
3 months ago by
It was mostly an annoyance while debugging but its awesome that it turned up a more significant issue.
Now I just have to get onto version 6 to get the patch. :)
Please login to add an answer/comment or follow this question.

Similar posts:
Search »