Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/sdks
diff options
context:
space:
mode:
authorAnkit Jain <radical@gmail.com>2020-02-24 21:50:10 +0300
committerGitHub <noreply@github.com>2020-02-24 21:50:10 +0300
commit27c56606594fd1e42a3d9f4c3bb215cb4349430a (patch)
treeedca0736164cb6af3084bea7bbf82070360ad5f4 /sdks
parentace2e34aae952ce79f34080954313bdbe7259509 (diff)
[wasm][debugger] Don't mark the runtime ready before clearing the (#19015)
.. breakpoints. Chrome tries set the breakpoints from previous sessions when the debugger starts up. And we set that in mono, if the runtime is ready. But in `MonoProxy.RuntimeReady`, we mark the runtime ready *before* clearing the breakpoints. So, we end up setting the breakpoints, as asked by chrome debugger, but then subsequently clearing them! This manifests as previously set breakpoints in managed code not getting hit, but if we reset the breakpoint manually then it gets hit.
Diffstat (limited to 'sdks')
-rw-r--r--sdks/wasm/Mono.WebAssembly.DebuggerProxy/MonoProxy.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/sdks/wasm/Mono.WebAssembly.DebuggerProxy/MonoProxy.cs b/sdks/wasm/Mono.WebAssembly.DebuggerProxy/MonoProxy.cs
index d2f78e82eec..ca1b37325ca 100644
--- a/sdks/wasm/Mono.WebAssembly.DebuggerProxy/MonoProxy.cs
+++ b/sdks/wasm/Mono.WebAssembly.DebuggerProxy/MonoProxy.cs
@@ -625,6 +625,11 @@ namespace WebAssembly.Net.Debugging {
if (context.RuntimeReady)
return;
+ var clear_result = await SendMonoCommand (sessionId, MonoCommands.ClearAllBreakpoints (), token);
+ if (clear_result.IsErr) {
+ Log ("verbose", $"Failed to clear breakpoints due to {clear_result}");
+ }
+
context.RuntimeReady = true;
var store = await LoadStore (sessionId, token);
@@ -634,11 +639,6 @@ namespace WebAssembly.Net.Debugging {
SendEvent (sessionId, "Debugger.scriptParsed", scriptSource, token);
}
- var clear_result = await SendMonoCommand (sessionId, MonoCommands.ClearAllBreakpoints (), token);
- if (clear_result.IsErr) {
- Log ("verbose", $"Failed to clear breakpoints due to {clear_result}");
- }
-
foreach (var bp in context.Breakpoints) {
if (bp.State != BreakpointState.Pending)
continue;