Skip to content
Merged
Changes from 1 commit
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
Next Next commit
backport 76072
  • Loading branch information
thaystg committed Sep 23, 2022
commit db37dec9987c031b091045d7b5b6da7e909a497a
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 @@ -55,6 +55,9 @@ protected override async Task<bool> AcceptEvent(SessionId sessionId, string meth
{
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 @@ -68,7 +71,6 @@ protected override async Task<bool> AcceptEvent(SessionId sessionId, string meth
{
// 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 Expand Up @@ -242,6 +244,7 @@ private async Task<bool> IsRuntimeAlreadyReadyAlready(SessionId sessionId, Cance

protected override async Task<bool> AcceptCommand(MessageId id, string method, JObject args, CancellationToken token)
{
System.Diagnostics.Debugger.Launch();
// Inspector doesn't use the Target domain or sessions
// so we try to init immediately
if (id == SessionId.Null)
Expand Down