❔ C# Exceptions Not Caught?
Why is this code causing Visual Studio to break if it is being ran in a try catch?
It takes me here and shows me this exception:
The issue is occuring here:
HttpResponseMessage httpResp = await Client.SendAsync(httpReq);
Regardless of the exception type, it should not be breaking in Visual Studio? I am running Visual Studio 2022 preview version5 Replies
Unfortunately I already started coding in .NET 8.0 (mistake) for the project so I am stuck with this preview version. Is it caused by the preview version and does anyone know if theres a setting that I can disable for this or something?
depending on your debugging options VS will break on exceptions regardless of whether they're in a try/catch or not
i don't use VS myself so i'm not sure exactly which option, but that's probably your problem
hmm, i didn't toggle anything, and i cant remember this happening in previous versions of VS @jimmacle
i checked if HttpExceptions were in the
break when exception is thrown
configuration and they were notyou can always change it in the project properties
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.