Whilst running my app using flutter run
in the console I can press 'r' to do a reload and press 'R' to do a reload and restart. Is there a way to do this whilst debugging in VS Code? Saving a file causes a hot reload but I can't figure out a way to do a full restart.
Edit
This is a little bit different to the hot reload option so I don't think this is a duplicate. This question regards performing a full restart of the application without reinstalling it. This is possible by pressing a capital R in the console, as opposed to pressing a lowercase r in the console which would perform a hot reload.
To perform a hot restart, run the Flutter: Hot Restart command from the Command Palette, or press Ctrl + F5 .
When debugging you can press Ctrl + F5 for a full restart, or you can run the Flutter: Full Restart command from the VS Code's command palette ( Ctrl + Shift + P or Cmd + Shift + P for macOS).
When debugging you can press Ctrl
+F5
for a full restart, or you can run the Flutter: Full Restart
command from the VS Code's command palette (Ctrl
+Shift
+P
or Cmd
+Shift
+P
for macOS).
Note: In the next version (v2.13.0, which there's a beta of available) "Full Restart" has been renamed to "Hot Restart" to better reflect how it works (this is happening across the other Flutter tools and docs too).
Related info:
The chosen answer wasn't working for me with Flutter 1.2.1 so I used this solution:
dart.flutterDebuggerRestartBehaviour
in VS Code settings and set it to hotRestart
start the debugger (F5) and click the restart button when you want to hot restart:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With