From 15ef86c8c10789b59280291aaaf4a670aa51eca2 Mon Sep 17 00:00:00 2001 From: Thays Date: Wed, 23 Sep 2020 16:22:12 -0300 Subject: [PATCH 1/2] Fixing step over in an async method. --- src/mono/mono/mini/debugger-engine.c | 5 ++++- src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs | 2 ++ src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs | 6 ++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/mono/mono/mini/debugger-engine.c b/src/mono/mono/mini/debugger-engine.c index c5964e0205342d..a028ff831742b0 100644 --- a/src/mono/mono/mini/debugger-engine.c +++ b/src/mono/mono/mini/debugger-engine.c @@ -1323,8 +1323,11 @@ mono_de_ss_start (SingleStepReq *ss_req, SingleStepArgs *ss_args) } else { frame_index = 1; +#ifndef TARGET_WASM if (ss_args->ctx && !frames) { - +#else + if (!frames) { +#endif mono_loader_lock (); locked = TRUE; diff --git a/src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs b/src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs index 99b08047e54242..b0754085a6c1c7 100644 --- a/src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs +++ b/src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs @@ -323,6 +323,8 @@ public SourceLocation GetLocationByIl(int pos) SequencePoint prev = null; foreach (SequencePoint sp in DebugInformation.SequencePoints) { + if (sp.IsHidden) + continue; if (sp.Offset > pos) break; prev = sp; diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs index 16cfe821c09074..e517b6daf155ad 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs @@ -903,8 +903,7 @@ await EvaluateAndCheck( }); } - // [Fact] - // [ActiveIssue("https://github.com/dotnet/runtime/issues/42424")] + [Fact] public async Task BreakOnAwaitThenStepOverToNextAwaitCall() { var insp = new Inspector(); @@ -927,8 +926,7 @@ await EvaluateAndCheck( }); } - // [Fact] - // [ActiveIssue("https://github.com/dotnet/runtime/issues/42424")] + [Fact] public async Task BreakOnAwaitThenStepOverToNextLine() { var insp = new Inspector(); From 17b77ff2fef2062617adb770006772a65981d675 Mon Sep 17 00:00:00 2001 From: Thays Date: Wed, 23 Sep 2020 16:25:46 -0300 Subject: [PATCH 2/2] Removing debugstore change. --- src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs b/src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs index b0754085a6c1c7..99b08047e54242 100644 --- a/src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs +++ b/src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs @@ -323,8 +323,6 @@ public SourceLocation GetLocationByIl(int pos) SequencePoint prev = null; foreach (SequencePoint sp in DebugInformation.SequencePoints) { - if (sp.IsHidden) - continue; if (sp.Offset > pos) break; prev = sp;