[wingide-users] Debugger: Exceptions docs and more control?
Wing IDE Support
support at wingware.com
Tue Mar 8 09:21:48 MST 2011
Let me answer your later questions first. My suggestion is to use the
when printed exception mode and insert code into your try except blocks
to either reraise or print the exception when Wing's debugger is active
-- something along the lines of:
if __debug__ and 'WINGDB_ACTIVE' in os.environ:
raise # or logging.exception('Exception')
Since exceptions are used for non-error flow control in Python and for
probing to see if things are implemented, the always report mode isn't
very useful and I doubt limiting to project files would help much.
On 3/8/11 5:22 AM, Graham Wideman wrote:
> 1. The "Report Logged Exceptions In When Printed Mode" checkbox
If enabled, this treats a call to logging.exception as if the traceback
> 2. Immediate if Appear Unhandled: What happens if debugger thinks an exception *is* handled -- no report? Or report, but not immediate?
If the debugger thinks the exception is handled, it is not reported.
This mode was Wing's default before the when printed mode was added. It
works reasonably well, but there's often a few exceptions that get
reported that are later handled.
> 3. How do the Never Report and Always Report lists interact with the Report Exceptions choices?
Never in the named lists overrides the Report Exceptions setting so
never means never (or almost never) and always means always. By
default, Wing will stop at a failed assert if Report Exceptions is never
and won't stop on SystemExit if Report Exceptions is always.
More information about the wingide-users