Skip to content

"Save All" results in multiple "Hot Reloading..." notifications #5552

Closed

Description

@orestesgaolin

Is your feature request related to a problem? Please describe.
If you have multiple (n) files modified, then selecting Save All Files in VS Code triggers n hot reload notifications (although it's just one hot reload log). The confusing part is that the notifications do not disappear at once, so it suggests that multiple processes are kicked off. If there's a single request then we're probably fine and this issue can be closed.

screenshot_20250618_094552.mp4

Describe the solution you'd like
When I choose to save all files at once, it should only trigger single hot reload.

Describe alternatives you've considered
Using command line and pressing r for hot reload after saving files.

Additional context

  • running on iOS simulator
  • extension version 3.112.0
  • Flutter 3.29.3

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on Jun 18, 2025
  2. DanTup commented on Jun 18, 2025

    @DanTup
    Member

    Unfortunately VS Code doesn't have any "Save All" event we can listen for - I requested this but it was rejected: microsoft/vscode#86087

    We used to debounce this client-side, but moved the debouncing to the Flutter tool so that all clients got it. However since I don't trigger this much, I didn't realise the notifications were being duplicated as a result - I think this is probably an argument to add a small debounce back to the extension (or at least ensure only a single combined notification when multiple reloads are triggered).

    I'm not sure why the notifications don't disappear at the same time though - I'll do some testing.

  3. added this to the v3.114.0 milestone on Jun 18, 2025
  4. changed the title [-]Save All Files should trigger one hot reload[/-] [+]"Save All" results in multiple "Hot Reloading..." notifications, which do not complete at the same time[/+] on Jun 18, 2025
  5. added
    in flutterRelates to running Flutter apps
    in debuggingRelates to the debug adapter or process of running debug sessions
    and removed
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on Jun 18, 2025
  6. orestesgaolin commented on Jun 18, 2025

    @orestesgaolin
    Author

    I see, that's quite annoying on the VS Code's side to reject highly upvoted feature request.

  7. DanTup commented on Jun 18, 2025

    @DanTup
    Member

    I can't reproduce the notifications vanishing at different times - are you able to capture a log using Dart: Capture Debugging Logs (start it just before you do the Save All, then click Cancel after they all vanish to stop logging and open the log file).

    I'm re-adding a small debounce client-side to prevent the additional requests, although depending on timing, you might still see multiple notifications (I can't collapse them into one from the extension since they originate from the debug adapter). In my testing, I've only been able to trigger one though.

  8. DanTup commented on Jun 18, 2025

    @DanTup
    Member

    I've decided against the debounce (since it adds latency), and instead I'm going to combine the notifications instead. Although they originate in the debug adapter, we control showing them as toast notifications from the extension and should be able to merge them.

  9. DanTup commented on Jun 18, 2025

    @DanTup
    Member

    I've pushed some changes that combine the notifications, although I did also add a very short (10ms) debounce, because while testing I found that sometimes Flutter would still process the multiple requests sequentially, which resulted in multiple notifications, and since they are animated, even if one finishes before the next starts, you can still see multiple on the screen at once.

    With that change, less reloads should go to Flutter, and when multiple do, the notifications should be less "spammy".

    I'm still unsure why yours seemed to queue up though - let's file a separate issue for that when you have a log file from above.

    Thanks!

  10. changed the title [-]"Save All" results in multiple "Hot Reloading..." notifications, which do not complete at the same time[/-] [+]"Save All" results in multiple "Hot Reloading..." notifications[/+] on Jun 18, 2025
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