Skip to content
Merged
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
Fix debug a app that has another .NET Wasm instance in a service worker
  • Loading branch information
thaystg authored Sep 23, 2022
commit 346ff26e0d36ee4e496ee4b203e4a640caea3d22
4 changes: 3 additions & 1 deletion src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ protected override async Task<bool> AcceptEvent(SessionId sessionId, JObject par
{
case "Runtime.consoleAPICalled":
{
// Don't process events from sessions we aren't tracking
if (!contexts.TryGetValue(sessionId, out ExecutionContext context))
return false;
string type = args["type"]?.ToString();
if (type == "debug")
{
Expand All @@ -110,7 +113,6 @@ protected override async Task<bool> AcceptEvent(SessionId sessionId, JObject par
{
// The optional 3rd argument is the stringified assembly
// list so that we don't have to make more round trips
ExecutionContext context = GetContext(sessionId);
string loaded = a[2]?["value"]?.ToString();
if (loaded != null)
context.LoadedFiles = JToken.Parse(loaded).ToObject<string[]>();
Expand Down