Flutter web debug stops on breakpoints but in another source file on Visual Studio Code

I’m using flutter web on Visual Studio Code for a long time without problems. I’ve updated to the last Flutter release (2.10.4) and all continues well during some days but, suddenly, the breakpoints stops in other parts of code.

I’ve created a new project and put a breakpoint on main.dart, on runApp(MyApp()):

void main() {
  runApp(MyApp());
}

When the program starts, on VSC the breakpoint is stopped on the file web_entrypoint.dart (not in main.dart), on the first line. On Chrome, is correct, the source shown is main.dart and stopped on the breakpoint.

I’ve downgraded Flutter, uninstalled Flutter and Visual Studio Code, but continues with the same problem.

Flutter doctor indicates that everything is correct:

✓] Flutter (Channel stable, 2.10.4, on KDE neon User - 5.24 5.13.0-39-generic, locale es_ES.UTF-8)
    • Flutter version 2.10.4 at /home/indulgeme-dev/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c860cba910 (hace 7 días), 2022-03-25 00:23:12 -0500
    • Engine revision 57d3bac3dd
    • Dart version 2.16.2
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /opt/android-sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /opt/android-studio-2021.1.1/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /opt/android-studio-2021.1.1/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)

[✓] Android Studio
    • Android Studio at /opt/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)

[✓] VS Code (version 1.65.2)
    • VS Code at /usr/share/code
    • Flutter extension version 3.36.0

[✓] Connected device (2 available)
    • Moto G 5 Plus (mobile) • ZY2247BMKF • android-arm    • Android 8.1.0 (API 27)
    • Chrome (web)           • chrome     • web-javascript • Google Chrome 100.0.4896.60

[✓] HTTP Host Availability
    • All required HTTP hosts are available

1 thought on “Flutter web debug stops on breakpoints but in another source file on Visual Studio Code

Comments are closed.