diff options
author | Larry Ewing <lewing@microsoft.com> | 2020-03-05 22:35:41 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-05 22:35:41 +0300 |
commit | f95d1413d3378cbed5e8e5ed80af898d95c0437e (patch) | |
tree | 14cc8060c4424c5039705336422f9897c0b30b56 /sdks | |
parent | 93e7ef2b0fe07475119cc1132a7a48e3945e7412 (diff) |
[wasm][debugger] Check runtime state before attempting to resolve breakpoints (#19134)
Handle the case where the breakpoint request comes in very early before the runtime initialized by deferring resolution until normal runtime init.
Diffstat (limited to 'sdks')
-rw-r--r-- | sdks/wasm/Mono.WebAssembly.DebuggerProxy/MonoProxy.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sdks/wasm/Mono.WebAssembly.DebuggerProxy/MonoProxy.cs b/sdks/wasm/Mono.WebAssembly.DebuggerProxy/MonoProxy.cs index b5dd1be314a..7a391ab59bc 100644 --- a/sdks/wasm/Mono.WebAssembly.DebuggerProxy/MonoProxy.cs +++ b/sdks/wasm/Mono.WebAssembly.DebuggerProxy/MonoProxy.cs @@ -282,10 +282,12 @@ namespace WebAssembly.Net.Debugging { var bpid = resp.Value["breakpointId"]?.ToString (); var request = BreakpointRequest.Parse (bpid, args); context.BreakpointRequests[bpid] = request; - var store = await RuntimeReady (id, token); + if (await IsRuntimeAlreadyReadyAlready (id, token)) { + var store = await RuntimeReady (id, token); - Log ("verbose", $"BP req {args}"); - await SetBreakpoint (id, store, request, token); + Log ("verbose", $"BP req {args}"); + await SetBreakpoint (id, store, request, token); + } SendResponse (id, Result.OkFromObject (request.AsSetBreakpointByUrlResponse()), token); return true; |