Index: runtime/vm/debugger.cc |
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc |
index 5573f4bd9e0475cf5c09f63077ed897f74ebd8a6..2855c1826009d6cc2882bb3f356cdadf2be7bba2 100644 |
--- a/runtime/vm/debugger.cc |
+++ b/runtime/vm/debugger.cc |
@@ -2395,7 +2395,17 @@ void Debugger::SignalPausedEvent(ActivationFrame* top_frame, |
event.set_top_frame(top_frame); |
event.set_breakpoint(bpt); |
Object& closure_or_null = Object::Handle(top_frame->GetAsyncOperation()); |
- event.set_async_continuation(&closure_or_null); |
+ if (!closure_or_null.IsNull()) { |
+ event.set_async_continuation(&closure_or_null); |
+ const Script& script = Script::Handle(top_frame->SourceScript()); |
+ const TokenStream& tokens = TokenStream::Handle(script.tokens()); |
+ TokenStream::Iterator iter(tokens, top_frame->TokenPos()); |
+ if ((iter.CurrentTokenKind() == Token::kIDENT) && |
+ ((iter.CurrentLiteral() == Symbols::Await().raw()) || |
+ (iter.CurrentLiteral() == Symbols::YieldKw().raw()))) { |
+ event.set_at_async_jump(true); |
+ } |
+ } |
Pause(&event); |
} |