diff --git a/src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs b/src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs index 5fc72c491c3b58..ae4dda53fa2686 100644 --- a/src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs +++ b/src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs @@ -237,6 +237,7 @@ protected override async Task AcceptEvent(SessionId sessionId, string meth { case var _ when url == "": case var _ when url.StartsWith("wasm://", StringComparison.Ordinal): + case var _ when url.EndsWith(".wasm", StringComparison.Ordinal): { Log("verbose", $"ignoring wasm: Debugger.scriptParsed {url}"); return true; @@ -961,7 +962,9 @@ private async Task SendCallStack(SessionId sessionId, ExecutionContext con string function_name = frame["functionName"]?.Value(); string url = frame["url"]?.Value(); if (!(function_name.StartsWith("wasm-function", StringComparison.Ordinal) || - url.StartsWith("wasm://wasm/", StringComparison.Ordinal) || function_name == "_mono_wasm_fire_debugger_agent_message")) + url.StartsWith("wasm://", StringComparison.Ordinal) || + url.EndsWith(".wasm", StringComparison.Ordinal) || + function_name == "_mono_wasm_fire_debugger_agent_message")) { callFrames.Add(frame); } diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs index 3dc2bc246364c9..62a2eee77c6fdb 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs @@ -155,6 +155,12 @@ await EvaluateAndCheck( Assert.Equal("object", scope["object"]["type"]); CheckLocation("dotnet://debugger-test.dll/debugger-test.cs", 8, 4, scripts, scope["startLocation"]); CheckLocation("dotnet://debugger-test.dll/debugger-test.cs", 14, 4, scripts, scope["endLocation"]); + + foreach (var frame in pause_location["callFrames"]) + { + Assert.Equal(false, frame["url"].Value().Contains(".wasm")); + Assert.Equal(false, frame["url"].Value().Contains("wasm://")); + } return Task.CompletedTask; } );