Skip to content

Commit

Permalink
Fix debug a app that has another .NET Wasm instance in a service work…
Browse files Browse the repository at this point in the history
…er (#76072)
  • Loading branch information
thaystg authored Oct 11, 2022
1 parent 26cc618 commit 2b07c8c
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit 2b07c8c

Please sign in to comment.