Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ protected override async Task<bool> AcceptEvent(SessionId sessionId, string meth
{
case var _ when url == "":
case var _ when url.StartsWith("wasm://", StringComparison.Ordinal):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason we're usingurl.StartsWith("wasm://" here and url.StartsWith("wasm://wasm/", in SendCallStack?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

case var _ when url.EndsWith(".wasm", StringComparison.Ordinal):
{
Log("verbose", $"ignoring wasm: Debugger.scriptParsed {url}");
return true;
Expand Down Expand Up @@ -961,7 +962,9 @@ private async Task<bool> SendCallStack(SessionId sessionId, ExecutionContext con
string function_name = frame["functionName"]?.Value<string>();
string url = frame["url"]?.Value<string>();
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);
}
Expand Down
6 changes: 6 additions & 0 deletions src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>().Contains(".wasm"));
Assert.Equal(false, frame["url"].Value<string>().Contains("wasm://"));
}
return Task.CompletedTask;
}
);
Expand Down