VS Code (OSX) Flutter hot reload is not triggered by save

后端 未结 3 1793
旧时难觅i
旧时难觅i 2021-01-12 06:37

After upgrading VS Code version to 1.32.1 automatic hot reloading is not triggered by saving / auto saving. It worked like a charm before.

Hot reloading still works

3条回答
  •  佛祖请我去吃肉
    2021-01-12 07:33

    I had the same problem. Currently I am using VSCode version 1.39.2.

    For the hot reload to work you need to start debugging in VSCode.

    As it says in the docs: "Only Flutter apps in debug mode can be hot reloaded." https://flutter.dev/docs/development/tools/hot-reload

    You can find that option on the VSCode's top navigation inside Debug or with the shortcut F5.

    You don't need to do flutter run on your terminal, nor even on VSCode, is just start debugging and it will launch lib/main.dart in debug mode.

    If that doesn't solve the problem, try downgrading to the last version of VSCode.

提交回复
热议问题