I'm doing some debugging where I really want to have the "break when exception is thrown" option turned on. There's a third party assembly I rely on that regularly throws exceptions. Some of them, like SynchronizationLockException I can turn off via Debug -> Exceptions menu.
The problem is they also have some custom exception types. Is there anyway to turn those off?
To turn off stop on exceptions press " Ctrl + Alt + E ". This will open the Exceptions window . Untick "Common Language Runtime Exceptions - Thrown". That would prevent it from pausing from within the delegate, but not when it's rethrown on Wait .
In the Exception Settings window (Debug > Windows > Exception Settings), expand the node for a category of exceptions, such as Common Language Runtime Exceptions. Then select the check box for a specific exception within that category, such as System. AccessViolationException.
In the Debug > Exceptions dialog, click Add, select Common Language Runtime exceptions, and enter the full name (not the assembly-qualified name) of the exception. Then uncheck the Thrown checkbox for this exception.
In Visual Studio 2019, when the exception occurs, there will be an information dialog.
Just un-check "Break when this exception type is user-unhandled".
I think that you can try to uncheck this option <All Common Language Runtime Exceptions not in this list>
:
In this case, most .NET Framework built-in exceptions will break but not those custom exception types which do not appear in the list.
Should you find some more exception types that you wish to break, you can right click on the Common Language Runtime Exceptions
and then add more types to break:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With