Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ahmed951 opened this issue Sep 3, 2022 · 6 comments
Labels
in debugger Relates to the debug adapter or process of launching a debug session in flutter Relates to running Flutter apps is bug
Milestone

Comments

@ahmed951
Copy link

ahmed951 commented Sep 3, 2022

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
@ahmed951 ahmed951 added the is bug label Sep 3, 2022
@mehmetext
Copy link

Same error for me

@LastMonopoly
Copy link

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)

@DanTup DanTup 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 Sep 5, 2022
@DanTup DanTup added the in flutter Relates to running Flutter apps label Sep 5, 2022
@DanTup DanTup added this to the v3.48.1 milestone Sep 5, 2022
@DanTup DanTup added the in debugger Relates to the debug adapter or process of launching a debug session label Sep 5, 2022
@DanTup
Copy link
Member

DanTup commented Sep 5, 2022

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

@DanTup DanTup mentioned this issue Sep 5, 2022
2 tasks
@DanTup
Copy link
Member

DanTup commented Sep 5, 2022

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

@DanTup DanTup closed this as completed Sep 5, 2022
@ahmed951
Copy link
Author

ahmed951 commented Sep 5, 2022

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.

@DanTup
Copy link
Member

DanTup commented Sep 5, 2022

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
Labels
in debugger Relates to the debug adapter or process of launching a debug session in flutter Relates to running Flutter apps is bug
Projects
None yet
Development

No branches or pull requests

4 participants