Skip to content

Commit f22e082

Browse files
zichanggcommit-bot@chromium.org
authored andcommitted
[vm] debugger print incomplete async stacktrace
With --trace-debugger-stacktrace being set, debugger will print the stack trace for both async and sync cases. But for async stacktrace, awaiters return call stack are missing from printing. Change-Id: I2a81ead25bcad5b3b25da4666940f631237352d1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106441 Reviewed-by: Ben Konyi <[email protected]> Commit-Queue: Zichang Guo <[email protected]>
1 parent 44415c4 commit f22e082

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

runtime/vm/debugger.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2470,6 +2470,12 @@ DebuggerStackTrace* Debugger::CollectAwaiterReturnStackTrace() {
24702470
ActivationFrame* activation = new (zone) ActivationFrame(async_activation);
24712471
activation->ExtractTokenPositionFromAsyncClosure();
24722472
stack_trace->AddActivation(activation);
2473+
if (FLAG_trace_debugger_stacktrace) {
2474+
OS::PrintErr(
2475+
"CollectAwaiterReturnStackTrace: visiting awaiter return "
2476+
"closures:\n\t%s\n",
2477+
activation->function().ToFullyQualifiedCString());
2478+
}
24732479
next_async_activation = activation->GetAsyncAwaiter();
24742480
if (next_async_activation.IsNull()) {
24752481
// No more awaiters. Extract the causal stack trace (if it exists).

0 commit comments

Comments
 (0)