In my Blazor server app, I have the famous 'counter' page / button
private void IncrementCount(){ currentCount++; throw new Exception("test");}This is ok - exception is thrown.
If I change it to this:
private Task IncrementCount(){ currentCount++; throw new Exception("test");}it is also ok / exception is thrown.
But if I change it to this code:
private async Task IncrementCount(){ currentCount++; throw new Exception("test");}then it freezes the app and it is not responding to clicks / no exception is thrown in Visual Studio.
Is it some .NET debugger bug? (in prod exception is visible in console etc)
How to avoid this? How to force debugger to throw exception in this case also?
Thanks and regards