Skip to content

Breakpoints in unit tests are not hit under certain conditions #60396

@jsroest

Description

@jsroest
import 'package:test/test.dart';

void main() {
  test('breakpoint test', () {
    print('hello world');
  });
}

// Uncomment this and breakpoints will not be hit.
// But if you move this enum declaration above the main, breakpoints will be
// hit again.
// enum JustAnotherEnum { choice1, choice2 }
  • Dart SDK version: 3.7.2 (stable) (Tue Mar 11 04:27:50 2025 -0700) on "macos_x64"
  • Flutter (Channel stable, 3.29.2, on macOS 15.3.1 24D70 darwin-x64, locale en-NL)
  • Android Studio Meerkat | 2024.3.1
  • Flutter plugin 83.0.4
  • Dart plugin 243.23177

Sample project:
https://github.com/jsroest/breakpoint_unittest_issue

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work onarea-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.triagedIssue has been triaged by sub team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions