Skip to content

Commit b89c0dd

Browse files
authored
Avoid trying to get callstack[0] when it's empty like in an instrumentation pause (#82852)
1 parent f2ac74b commit b89c0dd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ protected override async Task<bool> AcceptEvent(SessionId sessionId, JObject par
183183

184184
protected async Task<bool> OnDebuggerPaused(SessionId sessionId, JObject args, CancellationToken token)
185185
{
186+
if (args?["callFrames"]?.Value<JArray>()?.Count == 0) //new browser version can send pause of type "instrumentation" with an empty callstack
187+
return false;
188+
186189
if (args["asyncStackTraceId"] != null)
187190
{
188191
if (!contexts.TryGetValue(sessionId, out ExecutionContext context))

0 commit comments

Comments
 (0)