1

Closed

Disabling Just My Code does not disable break on user-unhandled exceptions

description

Disabling Just My Code in Debug->Options should also disable breaking on user-unhandled exceptions, since with the option disabled there is no way for the user to configure this feature.

This may require us to change AD7Engine to implement IDebugEngine3 so we can handle SetJustMyCodeState.

Original report:

The debugger always breaks at sys.exit(1) .

I've tried to untick the option "Wait for input when process exits abnormally", but it still breaks.

To reproduce just put the following line in a test.py and start the debugger.

sys.exit(1)
Closed Jun 18, 2013 at 7:00 PM by ZachA

comments

Zooba wrote Feb 15, 2013 at 3:34 PM

It's breaking because a SystemExit error has been raised. You can disable breaking on this by opening the Debug->Exceptions menu, expanding "Python Exceptions" and disabling both boxes for SystemExit.

Once you've done this, the option you changed will have an effect.

ardakolcak wrote Feb 18, 2013 at 9:13 AM

That is what the popup says as well when it breaks at system.exit. But all exceptions was ticked off by default including SystemExit and SystemError.

Thanks.

ardakolcak wrote Feb 19, 2013 at 11:42 AM

seriously this very annoying as visual studio keeps moving around completely pointless files at pointless locations just to show me there is a system.exit call.

Zooba wrote Feb 19, 2013 at 3:48 PM

It looks like we have a bug relating to Just My Code, which is a VS debugging feature: we don't do anything different if it's disabled. However, if it is disabled, VS will not show you the second checkbox for SystemExit. (I'll update the details of this issue now that I understand what's causing it.)

The workaround is to enable Just My Code (through Debug->Options and Settings) and then go into the Debug->Exceptions dialog. You'll see both checkboxes for SystemExit and can deselect the second one.

If you don't want to use Just My Code, then you can deselect the second checkbox ("User-unhandled") for Python Exceptions and disable Just My Code again, which will prevent this from occurring for any exception.

ZachA wrote Jun 18, 2013 at 6:54 PM

** Closed by ZachA 06/18/2013 11:54AM