Skip to content

Debugger sometimes get stuck in "running" state even though it's paused #2282

@DanTup

Description

@DanTup

Moving from dart-lang/sdk#40725.

If you run this:

void main() {
  var steps = 0;
  while (true) {
    steps++; // Breakpoint here
    print('Has run $steps steps');
  }
}

Then keep pressing F5, you'll quickly end up in a state where VS Code thinks the app is running (it has a Pause button) but it is stopped at the breakpoint.

The issue seems to be that we process the response to the resume command sent to the VM after the PauseBreakpoint event, resulting in the UI being left in the "running" state when it's actually paused.

Screenshot 2020-03-02 at 16 26 40

The events in the log are in the correct order (suggesting they came from the VM in the correct order):

Screenshot 2020-03-02 at 16 26 50

Metadata

Metadata

Assignees

No one assigned

    Labels

    in debuggingRelates to the debug adapter or process of running debug sessionsis bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions