Skip to content

Flutter Hot Reload and Hot Restart are unavailable when running without debugging when SDK DAPs are enabled #4139

Closed

Description

@ahmed951

Describe the bug
Today I faced a problem when running my app, the hot reload feature was not working when I save the file.
I usually run my app using "Run without debugging" and when I save the file there was a notification appears that said "Performing hot reload...", but with version 3.48.0 it doesn't appear and hot reload doesn't work.

I have downgrade the extension to V3.46.1 and everything work as before.

I then update it again to V3.48.0 and hot reload didn't work so I am sure that the problem is in this version.

Note: Hot reload work normally when run the app with "Start debugging".

Please complete the following information:

  • Operating System and version: Windows 11 Version 21H2
  • VS Code version: 1.70.2
  • Dart extension version: 3.48.0
  • Dart/Flutter SDK version: Flutter 3.3 SDK

Activity

  1. mehmetext commented on Sep 5, 2022

    @mehmetext

    Same error for me

  2. LastMonopoly commented on Sep 5, 2022

    @LastMonopoly

    Same here.

    [✓] Flutter (Channel stable, 3.3.0, on macOS 12.5.1 21G83 darwin-x64, locale
    en-CN)
    [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    [✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
    [✓] Chrome - develop for the web
    [✓] Android Studio (version 2021.2)
    [✓] VS Code (version 1.71.0)

  3. changed the title [-]Hot reload is not working when saving files with Dart extension V3.48.0 in VS code.[/-] [+]Flutter Hot Reload and Hot Restart are unavailable when running without debugging when SDK DAPs are enabled[/+] on Sep 5, 2022
  4. added this to the v3.48.1 milestone on Sep 5, 2022
  5. added
    in debuggingRelates to the debug adapter or process of running debug sessions
    on Sep 5, 2022
  6. DanTup commented on Sep 5, 2022

    @DanTup
    Member

    Thanks for the report! I can reproduce and think I understand the problem. Working on a fix.

  7. DanTup commented on Sep 5, 2022

    @DanTup
    Member

    Fixed by 1ec0496, released as Dart extension v3.48.1 (it sometimes takes up to 30min for updates to appear in VS Code).

  8. ahmed951 commented on Sep 5, 2022

    @ahmed951
    Author

    Thank you @DanTup for your effort, hot reload is working now on save ❤️.
    Notifications still not appear like "Performing hot reload" , "Running Gradle task 'assembleDebug'",..etc but I think it is not very important like hot reload on save and I found that you opened an issue for that.

    Again thank you for your effort and for fixing the problem very fast.

  9. DanTup commented on Sep 5, 2022

    @DanTup
    Member

    Yeah, I noticed the same while testing. I'll get that fixed for a future update. In the meantime if you really miss them you can switch back to the old debug adapters by putting "dart.previewSdkDaps": false in your VS Code settings, although sticking the new ones will help me find if there are any other things that have been missed like this so I can fix up anything missing before rolling out more widely :-)

    Thanks!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    in debuggingRelates to the debug adapter or process of running debug sessionsin flutterRelates to running Flutter appsis bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions