Index: runtime/vm/debugger.cc |
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc |
index a4afc16275873e52c3b3dac54563a4b5253b7e86..c076689dac5508438ec321fad19b6df5dc83e06b 100644 |
--- a/runtime/vm/debugger.cc |
+++ b/runtime/vm/debugger.cc |
@@ -376,6 +376,17 @@ Breakpoint* BreakpointLocation::AddPerClosure(Debugger* dbg, |
if (bpt->IsPerClosure() && bpt->closure() == closure.raw()) break; |
bpt = bpt->next(); |
} |
+ if (for_over_await && |
+ (bpt != NULL) && |
+ (bpt == dbg->synthetic_async_breakpoint_)) { |
+ // If the debugger is paused after stepping over an await statement, |
Cutch
2016/09/21 23:43:45
I wonder if we could just do the following in this
hausner
2016/09/21 23:59:28
Why is it important to create a new synthetic BP e
|
+ // the synthetic breakpoint is temporarily kept in |
+ // synthetic_async_breakpoint_ so it can be deleted when the step |
+ // command resumes. |
+ // If another step request over an async statement is issued, make |
+ // sure the synthetic breakpoint does not get deleted. |
+ dbg->synthetic_async_breakpoint_ = NULL; |
+ } |
if (bpt == NULL) { |
bpt = new Breakpoint(dbg->nextId(), this); |
bpt->SetIsPerClosure(closure); |