This project has moved and is read-only. For the latest updates, please go here.


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


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 and start the debugger.

Closed Jun 18, 2013 at 8:00 PM by ZachA


Zooba wrote Feb 15, 2013 at 4: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 10: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.


ardakolcak wrote Feb 19, 2013 at 12:42 PM

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 4: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 7:54 PM

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