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
4 changes: 2 additions & 2 deletions src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ internal class MonoProxy : DevToolsProxy
{
private IList<string> urlSymbolServerList;
private HashSet<SessionId> sessions = new HashSet<SessionId>();
private static readonly string[] s_executionContextIndependentCDPCommandNames = { "DotnetDebugger.setDebuggerProperty" };
protected Dictionary<SessionId, ExecutionContext> contexts = new Dictionary<SessionId, ExecutionContext>();

public static HttpClient HttpClient => new HttpClient();
Expand Down Expand Up @@ -258,7 +259,7 @@ protected override async Task<bool> AcceptCommand(MessageId id, JObject parms, C
if (id == SessionId.Null)
await AttachToTarget(id, token);

if (!contexts.TryGetValue(id, out ExecutionContext context))
if (!contexts.TryGetValue(id, out ExecutionContext context) && !s_executionContextIndependentCDPCommandNames.Contains(method))
{
if (method == "Debugger.setPauseOnExceptions")
{
Expand All @@ -267,7 +268,6 @@ protected override async Task<bool> AcceptCommand(MessageId id, JObject parms, C
if (pauseOnException != PauseOnExceptionsKind.Unset)
_defaultPauseOnExceptions = pauseOnException;
}
// for Dotnetdebugger.* messages, treat them as handled, thus not passing them on to the browser
return method.StartsWith("DotnetDebugger.", StringComparison.OrdinalIgnoreCase);
}

Expand Down