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

Add an option to control hot-reload-on-save behaviour when using auto-save #3110

Closed
skateboarder opened this issue Jan 31, 2021 · 7 comments · Fixed by #3122
Closed

Add an option to control hot-reload-on-save behaviour when using auto-save #3110

skateboarder opened this issue Jan 31, 2021 · 7 comments · Fixed by #3122
Labels
in editor Relates to code editing or language features in flutter Relates to running Flutter apps is enhancement
Milestone

Comments

@skateboarder
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Run a project
  2. Edit it while having the auto-save setting enabled

Expected behavior
On completion of auto-save, hot reload should've been triggered. But instead, its not triggered until manual save/reload

Versions (please complete the following information):

  • VS Code version: 1.52.1
  • Dart extension version: 3.19.1
  • Dart/Flutter SDK version: 2.12.0-133.7.beta/1.25.0-8.3.pre
@RandalSchwartz
Copy link

This is intended behavior! See #3033.

@DanTup DanTup added in editor Relates to code editing or language features in flutter Relates to running Flutter apps is enhancement and removed is bug labels Jan 31, 2021
@DanTup DanTup added this to the v3.20.0 milestone Jan 31, 2021
@DanTup DanTup changed the title No hot reload on auto-save Add an option to control hot-reload-on-save behaviour when using auto-save Jan 31, 2021
@DanTup
Copy link
Member

DanTup commented Jan 31, 2021

If this was working well for some, then I think it's probably fair to have a setting to control it (perhaps extend the existing setting to be an enum for on/off/manual or similar).

@encikpulasan
Copy link

This is one of the best feature and why i chose VSCode as my primary IDE. Should've make it optional since it works well on mac. Just my 2 cents.

@DanTup
Copy link
Member

DanTup commented Feb 2, 2021

I guess I underestimated how many people were using this without issues! The dart.flutterHotReloadOnSave will be updated to be an enum in the next release:

dart.flutterHotReloadOnSave

Whether to automatically send a Hot Reload request during a debug session when saving files.

  • never - do not reload when saving.
  • always - reload for all saves, manual or automatic.
  • manual - only reload for manual saves (requires pressing Save explicitly if using autosave).

@DanTup
Copy link
Member

DanTup commented Feb 3, 2021

This change hasn't landed yet, so keeping this open until it does.

@gokul656
Copy link

gokul656 commented Mar 24, 2021

I guess I underestimated how many people were using this without issues! The dart.flutterHotReloadOnSave will be updated to be an enum in the next release:

dart.flutterHotReloadOnSave

Whether to automatically send a Hot Reload request during a debug session when saving files.

  • never - do not reload when saving.
  • always - reload for all saves, manual or automatic.
  • manual - only reload for manual saves (requires pressing Save explicitly if using autosave).

Worked for me, Thanks..

@shaadart
Copy link

shaadart commented Jul 4, 2021

Asking from @DanTup and @Malware656 to post a working screenshot.

Edit, Thanks to all, Everything is working fine 😄

In vs code, Go to extentions tab then fund dart, (which is installed) then click the settings icon. There you have to find how to see the settings.json file, then you have to pass this code,

"dart.debugExternalLibraries": false,
    "dart.debugSdkLibraries": false,
    "dart.allowTestsOutsideTestFolder": true,
    "dart.flutterHotReloadOnSave" : "always", // < ---- This is the added code.

Now if you run it will work like swift.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in editor Relates to code editing or language features in flutter Relates to running Flutter apps is enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants