Skip to content

Debugger ignores a breakpoint #53376

Closed
Closed
@osaxma

Description

@osaxma

the issue was originally filed at Dart-Code/Dart-Code#4707

Describe the bug

The breakpoint at line 382 is ignored as shown in the screen recording below (it's taking several seconds because the setup prepares a database):

Screen.Recording.2023-08-25.at.8.49.56.PM.mov

To Reproduce
I could not reproduce outside of the project that I was working on, but I made a branch in my fork to reproduce:

  1. Checkout the debugger_breakpoint_issue branch
  2. Make sure Docker is available -- the tests will pull the latest postgres image so first run may be slow.
  3. Go to tests/v3_test.dart to line 382 and set a breakpoint as shown in the video
  4. Click debug above the test and the debugger skips the breakpoint

[Update] this is a minimal code sample to reproduce

void main() {
  final int y = 0;
  /* breakpoint here would hit */ final yd = y.toDouble();

  late final int x = 1; // late initialization causes the issue
  /* breakpoint here would miss */ final xd = x.toDouble();
}

Expected behavior
I expect the debugger to hit the breakpoint.

Please complete the following information:

  • Operating System and version: 12.6 (21G115)
  • VS Code version: 1.81.1
  • Dart extension version: v3.70.0
  • Dart/Flutter SDK version: Dart SDK version: 3.1.0 (stable) (Tue Aug 15 21:33:36 2023 +0000) on "macos_x64"

Additional context from see @DanTup:

Nothing looks wrong in the log until the debugger pauses at the wrong place. A new isolate starts paused, we send breakpoints, the VM responds. We then resume the isolate and both breakpoints resolve, but then we hit the second breakpoint.

from: Dart-Code/Dart-Code#4707 (comment)

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 teamvm-debugger

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions