Pausing at wrong location on Flutter Web only (breakpoints / debugger)

The following reproduces with the Flutter Gallery example app: https://github.com/flutter/gallery

Steps to reproduce:

  1. start the gallery app with flutter run -d chrome (this does not reproduce on other platforms, eg macos)
  2. set a breakpoint at this line
  3. in the gallery app, click material > app bar

Expected behavior: the app pauses in app_bar_demo.dart at the breakpoint
Actual behavior: the app paused in scheduler/binding.dart

Note: interestingly enough, if you open Chrome DevTools for the connected app, it will be paused at the correct place.

Paused Flutter DevTools (incorrect location):

Screen Shot 2022-03-31 at 10 28 01 AM

Paused Chrome DevTools (correct location):

Screen Shot 2022-03-31 at 10 28 16 AM

1 thought on “Pausing at wrong location on Flutter Web only (breakpoints / debugger)

Comments are closed.