Skip to content

Commit a717e15

Browse files
authored
Enable vm:notify-debugger-on-exception for more use cases enabled by upstream fix (flutter#81221)
1 parent 52661bc commit a717e15

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

packages/flutter/lib/src/scheduler/binding.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,7 @@ mixin SchedulerBinding on BindingBase {
451451
///
452452
/// Also returns false if there are no tasks remaining.
453453
@visibleForTesting
454-
// TODO(goderbauer): Add pragma (and enable test in
455-
// break_on_framework_exceptions_test.dart) once debugger breaks on correct
456-
// line, https://github.com/dart-lang/sdk/issues/45684
457-
// @pragma('vm:notify-debugger-on-exception')
454+
@pragma('vm:notify-debugger-on-exception')
458455
bool handleEventLoopCallback() {
459456
if (_taskQueue.isEmpty || locked)
460457
return false;

packages/flutter/lib/src/widgets/framework.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2834,10 +2834,7 @@ class BuildOwner {
28342834
///
28352835
/// After the current call stack unwinds, a microtask that notifies listeners
28362836
/// about changes to global keys will run.
2837-
// TODO(goderbauer): Add pragma (and enable test in
2838-
// break_on_framework_exceptions_test.dart) once debugger breaks on correct
2839-
// line, https://github.com/dart-lang/sdk/issues/45684
2840-
// @pragma('vm:notify-debugger-on-exception')
2837+
@pragma('vm:notify-debugger-on-exception')
28412838
void finalizeTree() {
28422839
Timeline.startSync('Finalize tree', arguments: timelineArgumentsIndicatingLandmarkEvent);
28432840
try {

packages/flutter_tools/test/integration.shard/break_on_framework_exceptions_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ void main() {
446446

447447
final int breakLine = (await flutter.getSourceLocation()).line;
448448
expect(breakLine, project.lineContaining(project.test, "throw 'scheduled task';"));
449-
}, skip: 'TODO(goderbauer): add pragma to SchedulerBinding.handleEventLoopCallback when https://github.com/dart-lang/sdk/issues/45684 is fixed and enable this test');
449+
});
450450

451451
testWithoutContext('breaks when FrameCallback throws', () async {
452452
final TestProject project = TestProject(
@@ -665,7 +665,7 @@ void main() {
665665

666666
final int breakLine = (await flutter.getSourceLocation()).line;
667667
expect(breakLine, project.lineContaining(project.test, "throw 'dispose';"));
668-
}, skip: 'TODO(goderbauer): add pragma to BuildOwner.finalizeTree when https://github.com/dart-lang/sdk/issues/45684 is fixed and enable this test');
668+
});
669669

670670
testWithoutContext('breaks when rebuilding dirty elements throws', () async {
671671
final TestProject project = TestProject(

0 commit comments

Comments
 (0)