From 9799ffab2208aaa8cd22169a5f445829f7e1f767 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Tue, 27 Apr 2021 11:13:55 -0700 Subject: [PATCH 1/3] Display top frame initially for Dart web --- .../lib/src/debugger/debugger_controller.dart | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/devtools_app/lib/src/debugger/debugger_controller.dart b/packages/devtools_app/lib/src/debugger/debugger_controller.dart index 978344a47be..b5e7c0763cb 100644 --- a/packages/devtools_app/lib/src/debugger/debugger_controller.dart +++ b/packages/devtools_app/lib/src/debugger/debugger_controller.dart @@ -690,6 +690,17 @@ class DebuggerController extends DisposableController return; } + // Collecting frames for Dart web applications can be slow. At the potential + // cost of a flicker in the stack view, display only the top frame + // initially. + if (await serviceManager.connectedApp.isDartWebApp || true) { + _populateFrameInfo( + [await _createStackFrameWithLocation(pauseEvent.topFrame)], + truncated: true); + unawaited(_getFullStack()); + return; + } + // We populate the first 12 frames; this ~roughly corresponds to the number // of visible stack frames. const initialFrameRequestCount = 12; From 453d3a3f83227c7b4b0fb62d13294da4b77fb324 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Tue, 27 Apr 2021 11:14:34 -0700 Subject: [PATCH 2/3] remove true clause --- packages/devtools_app/lib/src/debugger/debugger_controller.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/devtools_app/lib/src/debugger/debugger_controller.dart b/packages/devtools_app/lib/src/debugger/debugger_controller.dart index b5e7c0763cb..6dc8ac75357 100644 --- a/packages/devtools_app/lib/src/debugger/debugger_controller.dart +++ b/packages/devtools_app/lib/src/debugger/debugger_controller.dart @@ -693,7 +693,7 @@ class DebuggerController extends DisposableController // Collecting frames for Dart web applications can be slow. At the potential // cost of a flicker in the stack view, display only the top frame // initially. - if (await serviceManager.connectedApp.isDartWebApp || true) { + if (await serviceManager.connectedApp.isDartWebApp) { _populateFrameInfo( [await _createStackFrameWithLocation(pauseEvent.topFrame)], truncated: true); From b56943d8d7e6a1d7f1661a8d534c867f071955ed Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Tue, 27 Apr 2021 11:41:07 -0700 Subject: [PATCH 3/3] trailing --- .../devtools_app/lib/src/debugger/debugger_controller.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/devtools_app/lib/src/debugger/debugger_controller.dart b/packages/devtools_app/lib/src/debugger/debugger_controller.dart index 6dc8ac75357..c219a9520ef 100644 --- a/packages/devtools_app/lib/src/debugger/debugger_controller.dart +++ b/packages/devtools_app/lib/src/debugger/debugger_controller.dart @@ -695,8 +695,11 @@ class DebuggerController extends DisposableController // initially. if (await serviceManager.connectedApp.isDartWebApp) { _populateFrameInfo( - [await _createStackFrameWithLocation(pauseEvent.topFrame)], - truncated: true); + [ + await _createStackFrameWithLocation(pauseEvent.topFrame), + ], + truncated: true, + ); unawaited(_getFullStack()); return; }