Skip to content

Commit a640b08

Browse files
authored
[wasm][debugger] Never send messages from our internal protocol extensions to the browser (#77616)
* ignore messages from protocol extensions even for unknown context * Addressing @radical comments * adressing @radical comments * adressing @radical comments
1 parent 22de912 commit a640b08

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ protected override async Task<bool> AcceptCommand(MessageId id, JObject parms, C
267267
if (pauseOnException != PauseOnExceptionsKind.Unset)
268268
_defaultPauseOnExceptions = pauseOnException;
269269
}
270-
return false;
270+
// for Dotnetdebugger.* messages, treat them as handled, thus not passing them on to the browser
271+
return method.StartsWith("DotnetDebugger.", StringComparison.OrdinalIgnoreCase);
271272
}
272273

273274
switch (method)
@@ -566,8 +567,8 @@ protected override async Task<bool> AcceptCommand(MessageId id, JObject parms, C
566567
}
567568
}
568569
}
569-
570-
return false;
570+
// for Dotnetdebugger.* messages, treat them as handled, thus not passing them on to the browser
571+
return method.StartsWith("DotnetDebugger.", StringComparison.OrdinalIgnoreCase);
571572
}
572573

573574
private async Task<bool> ApplyUpdates(MessageId id, JObject args, CancellationToken token)

0 commit comments

Comments
 (0)