You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Save All" results in multiple "Hot Reloading..." notifications #5552
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.
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.
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
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.
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.
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.
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
Activity
DanTup commentedon Jun 18, 2025
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.
[-]Save All Files should trigger one hot reload[/-][+]"Save All" results in multiple "Hot Reloading..." notifications, which do not complete at the same time[/+]orestesgaolin commentedon Jun 18, 2025
I see, that's quite annoying on the VS Code's side to reject highly upvoted feature request.
DanTup commentedon Jun 18, 2025
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.
Add a short debounce to avoid duplicate Hot Reload notifications
DanTup commentedon Jun 18, 2025
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.
DanTup commentedon Jun 18, 2025
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!
[-]"Save All" results in multiple "Hot Reloading..." notifications, which do not complete at the same time[/-][+]"Save All" results in multiple "Hot Reloading..." notifications[/+]Combine overlapping Hot Restart/Hot Reload notifications