Skip to content

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

Closed

Description

@skateboarder

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

Activity

  1. RandalSchwartz commented on Jan 31, 2021

    @RandalSchwartz

    This is intended behavior! See #3033.

  2. added
    in editorRelates to code editing or language features
    in flutterRelates to running Flutter apps
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    and removed on Jan 31, 2021
  3. added this to the v3.20.0 milestone on Jan 31, 2021
  4. changed the title [-]No hot reload on auto-save[/-] [+]Add an option to control hot-reload-on-save behaviour when using auto-save[/+] on Jan 31, 2021
  5. DanTup commented on Jan 31, 2021

    @DanTup
    Member

    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).

  6. encikpulasan commented on Feb 2, 2021

    @encikpulasan

    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.

  7. DanTup commented on Feb 2, 2021

    @DanTup
    Member

    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).
  8. DanTup commented on Feb 3, 2021

    @DanTup
    Member

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

  9. reopened this on Feb 3, 2021
  10. added a commit that references this issue on Feb 4, 2021
    7758fca
  11. pinned this issue on Feb 8, 2021
  12. unpinned this issue on Mar 1, 2021
  13. gokul656 commented on Mar 24, 2021

    @gokul656

    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..

  14. shaadart commented on Jul 4, 2021

    @shaadart

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresin flutterRelates to running Flutter appsis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions