Skip to content

Hot Reload opens binding.dart at line 845 on every reload (no errors shown) #61560

Closed

Description

@sevrynx

Steps to reproduce

  1. Create a New Flutter Project with Flutter 3.35
  2. Start a Debug Session targetting Chrome in VS Code
  3. Trigger a Hot Reload either by clicking Hot Reload button or saving the file
  4. Observe that binding.dart file opens up at line 845

Code sample

import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Scaffold(
        body: Center(
          child: Text('Demo App'),
        ),
      ),
    );
  }
}

Flutter version

Flutter 3.35.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision d693b4b9db (7 days ago) • 2025-09-16 14:27:41 +0000
Engine • hash feee8ee8fb8b975dd9990f86d3bda11e6e75faf3 (revision c298091351) (7
days ago) • 2025-09-15 14:04:24.000Z
Tools • Dart 3.9.2 • DevTools 2.48.0

Activity

  1. added
    area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.
    on Sep 23, 2025
  2. biggs0125 commented on Sep 24, 2025

    @biggs0125

    I was unable to reproduce this and we haven't seen any other reports of this issue. Do you happen to have any other VS Code extensions that might be triggering this behavior? Does it happen for hot restarts as well or just hot reloads?

  3. added
    needs-infoWe need additional information from the issue author (auto-closed after 14 days if no response)
    on Sep 24, 2025
  4. sevrynx commented on Sep 24, 2025

    @sevrynx
    Author

    I posted this on StackOverflow and there seems to be one other person encountering the same issue. Here's the link to the form.

    As for extensions:

    alexisvt.flutter-snippets
    circlecodesolution.ccs-flutter-color
    dart-code.dart-code
    dart-code.flutter
    eamodio.gitlens
    fwcd.kotlin
    get-snippets.get-snippets
    github.copilot
    github.copilot-chat
    jeroen-meijer.pubspec-assist
    lyzerk.linecounter
    pkief.material-icon-theme
    usernamehw.errorlens
    vscjava.vscode-gradle

    This is what I have, I'll remove them one by one and check if it solves the problem. I'll get back to you in a few hours.

  5. nshahan commented on Sep 24, 2025

    @nshahan
    Contributor

    @oneebzahid
    Could you share the configuration you are using for starting the debug session? Is this defined in your launch_config.json file?

  6. removed
    needs-infoWe need additional information from the issue author (auto-closed after 14 days if no response)
    on Sep 25, 2025
  7. sevrynx commented on Sep 25, 2025

    @sevrynx
    Author

    Did you mean launch.json?
    {
    "version": "0.2.0",
    "configurations": [
    {
    "type": "chrome",
    "request": "launch",
    "name": "Launch Chrome against localhost",
    "url": "http://localhost:8080",
    "webRoot": "${workspaceFolder}"
    },
    ]
    }

  8. biggs0125 commented on Sep 25, 2025

    @biggs0125

    cc @DanTup in case you've seen this before

  9. DanTup commented on Sep 25, 2025

    @DanTup
    Collaborator

    I've not seen this and I'm not able to reproduce.

    @oneebzahid your launch config has "type": "chrome" which is not the right thing for starting a Flutter debug session - is that config related to this problem?

    Are you able to capture some logs?

    • Run the Dart: Capture Debugging Logs command
    • Start debugging the app
    • Reproduce the issue by clicking the reload button
    • Click Cancel on the logging notification to stop logging and open the log
    • Remove anything sensitive from the log
    • Attach the log here or in a gist

    Thanks!

  10. sevrynx commented on Sep 25, 2025

    @sevrynx
    Author

    I tried to capture the logs using Dart: Capture Logs, but the problem didn't occur when i did that. Even when I 'cancelled' the log capture, it didn't happen.

    But when I restarted the debug session (Started a new instance without log capture or debug). It started happening again.

    I'll post the log but my Power just got cut off :(

  11. 28 remaining items

  12. srujzs commented on Oct 9, 2025

    @srujzs
    Contributor

    dart-lang/webdev#2695 has just landed and should fix the issue (tested locally) once DWDS releases a version and Flutter picks it up.

  13. drrnbrns commented on Oct 29, 2025

    @drrnbrns

    In Flutter 3.35.7, I'm seeing exactly the behaviour described. Based on the timestamps I think I should have the fix. Should I log a new bug referencing this one?

    Flutter 3.35.7 • channel stable • https://github.com/flutter/flutter.git
    Framework • revision adc9010625 (8 days ago) • 2025-10-21 14:16:03 -0400
    Engine • hash 6b24e1b529bc46df7ff397667502719a2a8b6b72 (revision 035316565a) (8 days ago) • 2025-10-21 14:28:01.000Z
    Tools • Dart 3.9.2 • DevTools 2.48.0
    
  14. FMorschel commented on Oct 29, 2025

    @FMorschel
    Contributor

    @drrnbrns, as noted on the last few comments on the Flutter issue linked here (just above your comment) flutter/flutter#176693, the fix is not out on Flutter stable yet. There may be a beta, but I'm not sure I've not tested it myself on the latest beta.

  15. biggs0125 commented on Oct 29, 2025

    @biggs0125

    The fix was a bit larger than we wanted to patch into 3.35 stable. The fix has been cherrypicked into the beta branch and will be included with the Flutter 3.38 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dev-compilerweb-hot-reloadIssues related to stateful hot reload on the web

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions