Whenever I try to utilize Tasks That Throw Exceptions, usually in the cases of cancelling tasks, the debugger will always break on the exception inside the task delegate not letting me continue without totally removing the exception all together(Even if I wrap a cancelled task inside a try/catch the debugger will still throw on the Cancellation method as it throws an exception). Is there any way to disable this feature as I have to constantly run my programs without a debugger to avoid this feature?
More Info: I am using C# .net core 3.1, vs2019 16.7.2 Community Edition
Two ways, if you are already debugging:
If you want to add a global exception to visual studio 2019
Go to 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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.