Web socket Exception crashing Blazor WASM while debugging in VS2022?

Alex Morris 1 Reputation point
2022-09-30T13:15:08.297+00:00

I'm having some trouble trying to get Blazor WASM debugging to work with VS2022 17.3.3 and was wondering if anyone on here could give me a hand/ had encountered this issue before?

When running any Blazor WASM project(I've tried with a fresh project as well) with the debugger, it will open correctly and run for about ~10-60s, before crashing and closing the browser. I get the following error in the debug console:

https://i.stack.imgur.com/IREbQ.png

When running without debugger or via CLI the application runs without crashing.

I originally had an error in the browser identical to the one described here: https://learn.microsoft.com/en-us/answers/questions/741393/error-with-websocket.html but after disabling Hot Reload and Browser link this no longer started appearing, the crashing error still occurred though. Interestingly after re-enabling these settings the browser error has not reoccurred, and from what I can see hot reload isn't working at all when running with the debugger attatched.

Thanks for the help and happy to post any further details on my setup if anything else could be useful.

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,375 questions
{count} votes