Blazor app crashes when debugging after windows secutiry updates

Rossend Bruch 255 Reputation points
2023-03-15T11:27:48.58+00:00

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.Task1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task`1.get_Result() at Microsoft.WebAssembly.Diagnostics.DevToolsProxy.Run(Uri browserUri, WebSocket ideSocket)

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,665 questions
{count} votes

Accepted answer
  1. Eren Özdemir 120 Reputation points
    2023-03-16T07:50:53.73+00:00

    I am able to use breakpoints if I add them after running the project.

    9 people found this answer helpful.

15 additional answers

Sort by: Most helpful
  1. 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.

    1 person found this answer helpful.
    0 comments No comments

  2. 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 :

    1. Delete all breakpoints
    2. Run project in chrome or edge
    3. 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

    0 comments No comments

  3. 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.

    0 comments No comments

  4. 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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.