Break debugger on exception throws from async method, optionally even when it is caught by external code
This suggestion is migrated to Developer Community. Please use below link to view the current status.
## Consider following code:
Task.Run(() => throw new Exception("This breaks the debugger, fine"));
Task.Run(async () => throw new Exception("This doesn't, but should break"));
It is difficult to trace some exception thrown in async methods, especially when the method is invoked by external code, like async controller action methods in asp.net core, or async handler method in some messaging framework.
Notice, that even if the exception might be cought by some external code (e.g. asp.net core's middleware), I still might want to break the designer in my code where the exception was thrown.
I know that technically the exception is handled, but come with SOME solution to improve debugging experience.