VS Code Flutter auto hot reload not working after updating

1,901

Run the flutter doctor command and make sure that flutter is installed properly on your machine.

Which channel are you running on? Make sure that you run on the stable channel, as long as it does not give you any compile time issues.

If the flutter doctor works, then make sure that, if you are running on iOS (Physical Device), that you have bonjour service enabled. This is required in order to make debugging work on physical devices (for iOS 14+). Please also make sure that you add -v command to the end of your deploy function, to increase the log verbosity. Otherwise you can just deploy to the simulator.

If you are running on Android, there should not be any issues, unless there is a problem with the logcat. In this case you can try to go to android Studio and reboot the ADB (Android Debug Bridge), in which case the machine will try to reattach a debuggable process to your device. If it's still not working, then try another device. If that's not working, then add the -v command, I mentioned earlier, about log verbosity.

Post an update on your issue, once you have tried all of these suggestions.

[EDIT] Please make sure that hot reload is enabled on the vscode settings. Go to Settings > Search > Hot Reload, and make sure it's enabled for both Auto Save & Restart.

Please take a look at this image below: enter image description here

[EDIT ONCE AGAIN] If you look at the flutter documentation (https://flutter.dev/docs/development/tools/hot-reload) it says, that to run a flutter hot reload, you have to follow these steps:

Run the app from a supported Flutter editor or a terminal window. Either a physical or virtual device can be the target. Only Flutter apps in debug mode can be hot reloaded. Modify one of the Dart files in your project. Most types of code changes can be hot reloaded; for a list of changes that require a hot restart, see Special cases. If you’re working in an IDE/editor that supports Flutter’s IDE tools, select Save All (cmd-s/ctrl-s), or click the hot reload button on the toolbar.

Make sure that you follow all the steps in the documentation, then let's talk on this post again (https://flutter.dev/docs/development/tools/hot-reload)

Share:
1,901
Python Test
Author by

Python Test

Updated on November 28, 2022

Comments

  • Python Test
    Python Test over 1 year

    After I updated my Dart extension in VS Code, it doesn't automatically hot-reload my Flutter codes even though I've turned on autosave. Does anyone have an idea about how to solve it?