Open eMuonTau opened 9 months ago
Do you have VS set to break on all exceptions? That piece of code has a try/catch.
Do you have VS set to break on all exceptions? That piece of code has a try/catch.
Exception Settings are on default. WebSocketException is not even selected in CLR Exceptions and dialog indicates to break only when user-unhandled.
@eMuonTau I think the issue is with the second checkbox you have there.
Description
Visual Studio 2022 breaks on an unhandled WebSocketException when browser.CloseAsync() is called. This only happens on .NET 8. When using .NET 6 there is no exception. I got same exception a few times with .NET 7 but i couldn't reproduce it again. On .NET 8 it happens every time.
Looks like you can continue when this exception is thrown and there is no exception if debugger is not attached. If it is related to Visual Studio please let me know.
Complete minimal example reproducing the issue
Expected behavior:
It should not throw an exception.
Actual behavior:
Debugging breaks on WebSocketException when browser.CloseAsync() is called.
Call Stack
Versions