Skip to content

Breakpoints set in a Dart web app with vscode are not being before the app runs #2808

@nshahan

Description

@nshahan

Repro:

  1. Open the example directory (https://github.com/dart-lang/webdev/tree/main/example) in vscode.
  2. Set a breakpoint in main.dart on line 13.
    print('Initial Print :)');
  3. Click the debug link vscode inserts above the main method.

You should see the app build and start running, chrome pops up and there will be prints appearing in the vscode debug console.

Initial Print :)
Counter is now: 1
Counter is now: 2
Counter is now: 3
Counter is now: 4
...
  1. Now add a breakpoint on line 23.
    print('Counter is now: ${++count}');

You should see execution will pause.

  1. Click the "Restart" button in the vscode debugging UI to hot restart the app.

You should see that the breakpoint on line 13 is skipped again but the breakpoint on line 23 still works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onpackage:dwdstriagedtype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions