From cd2e0a6460948a01c3b0daddd7d6163b7ce9ed9b Mon Sep 17 00:00:00 2001 From: Thays Grazia Date: Thu, 9 Mar 2023 15:48:02 -0300 Subject: [PATCH] backport of 82852 (#82854) --- src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs b/src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs index 21c79bd30afa44..15682c6dad1e30 100644 --- a/src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs +++ b/src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs @@ -175,6 +175,9 @@ protected override async Task AcceptEvent(SessionId sessionId, JObject par if (!contexts.ContainsKey(sessionId)) return false; + if (args?["callFrames"]?.Value()?.Count == 0) + return false; + //TODO figure out how to stich out more frames and, in particular what happens when real wasm is on the stack string top_func = args?["callFrames"]?[0]?["functionName"]?.Value(); switch (top_func) {