Reputation: 8972
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?
Upvotes: 35
Views: 22458
Reputation: 1334
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:
Upvotes: 4
Reputation: 20061
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".
Upvotes: 10
Reputation: 292355
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.
Upvotes: 41