Flutter热重载在VSCode中的自动保存上不起作用 [英] Flutter hot reload doesn't work on autosave in VSCode
问题描述
Flutter 热重新加载
.几个小时前,我开始遇到这个问题,其中自动保存
不会 hot-reload
我的应用程序.手动按下 Ctrl + S
会触发热重载
,但自动保存
不会.我尝试重新安装VS Code和Flutter SDK,但问题仍然存在.
Flutter hot reloads
every time VS Code auto-saves
my project before. A few hours ago, I started experiencing this issue where auto-saving
doesn't hot-reload
my app. Pressing Ctrl+S
manually triggers hot reload
but auto-saving
does not. I've tried re-installing VS Code and Flutter SDK but the problem still exists.
我新安装的VS Code仅具有以下扩展名和设置:
My newly installed VS Code only has the following extensions and settings:
Dart:v3.19.1
Flutter:v3.19.0自动保存
设置为1000ms的afterDelay
Dart: v3.19.1
Flutter: v3.19.0
Auto-save
is set toafterDelay
of 1000ms
在vscode中自动保存时,如何热重载?另一个人在两个小时前遇到了相同的问题: https://github.com/Dart-Code/Dart-Code/issues/3110
How do I hot reload when autosaving in vscode? Another person had the same issue two hours ago: https://github.com/Dart-Code/Dart-Code/issues/3110
推荐答案
Dart&的最新版本.Flutter的VS Code扩展引起了问题.
v3.20或更高版本:您可以通过将保存时Flutter热重载
设置为始终
,在最新版本的自动保存中启用热重载.在您的VSCode设置中.
v3.20 and above: You can enable hot reload on autosave in the latest version by setting Flutter Hot Reload On Save
to always
in your VSCode settings.
v3.19:他们完全禁用了自动保存上的热重装.
v3.19: They disabled hot reload on autosave completely.
v3.18及以下版本::扩展名会在自动保存时自动重新加载.
v3.18 and below: The extension hot reloads automatically when auto saving.
这篇关于Flutter热重载在VSCode中的自动保存上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!