I am able to use breakpoints if I add them after running the project.
Blazor app crashes when debugging after windows secutiry updates
Afert 2023 march 14 updates my app stop debugging. If I start it without debugging it works ok, if I start it debugging it crashes at startup. The error is the following:
Microsoft.WebAssembly.Diagnostics.DevToolsProxy[0] DevToolsProxy::Run: Exception System.AggregateException: One or more errors occurred. (Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')) ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') at System.Collections.Generic.List1.get_Item(Int32 index) at Newtonsoft.Json.Linq.JContainer.GetItem(Int32 index) at Newtonsoft.Json.Linq.JArray.get_Item(Object key) at Microsoft.WebAssembly.Diagnostics.MonoProxy.AcceptEvent(SessionId sessionId, String method, JObject args, CancellationToken token) at Microsoft.WebAssembly.Diagnostics.DevToolsProxy.OnEvent(SessionId sessionId, String method, JObject args, CancellationToken token) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task
1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task`1.get_Result() at Microsoft.WebAssembly.Diagnostics.DevToolsProxy.Run(Uri browserUri, WebSocket ideSocket)
15 additional answers
Sort by: Most helpful
-
Lance Wright 5 Reputation points
2023-03-23T22:53:31.1833333+00:00 So as of today, Edge and Chrome are working. Chrome version 111.0.5563.111. I imagine this was truly a Microsoft update that broke everything and the browsers had to make an update to follow up. Because seeing different browsers fix the issue after some updates is pretty telling as to what happened. I professionally work on Blazor Server and Blazor WebAssembly projects. Only WebAssembly was broke, but it broke literally everything. If you had any breakpoints before you launched the code, everything would crash with WebAssembly and this was a huge set back for my company as we were not aware that the breakpoints were the issue for the first day or two. Blazor Server never seemed to be part of this issue as it worked this whole time, which would make sense since it's server side and not really the same as WebAssembly.
So go update your browsers, I'm sure more than just Chrome and Edge is working now.
-
Ali Poustdouzan 0 Reputation points
2023-03-17T11:37:02.0833333+00:00 After update my windows 11 in 2022-03-15 i have same issue, If i have any breakpoint in project my blazor app will crash after running in chrome and edge, But working in firefox.
Problem is firefox doesn't support debug for blazor.
Solution :
- Delete all breakpoints
- Run project in chrome or edge
- After that add your breakpoint
UPDATE :
Debug work on edge after update edge to last version, But still not working in chrome.I hope they fix this issue soon
-
Pankit Patel 0 Reputation points
2023-03-17T12:11:52.2+00:00 I am also experiencing an issue where my Blazor webassembly application crashes when I try to debug it.
-
Andrew 0 Reputation points
2023-03-17T16:24:16.11+00:00 This sucks, our company are paid enterprise VS users and we're all stuck with this.