VSCode hot reload for Flutter does not work

后端 未结 14 1247
野性不改
野性不改 2021-01-11 11:50

I\'m on VSCode right now working on my flutter application when hot reload just stops working, right in the middle of my development. I have absolutely no idea why this happ

14条回答
  •  没有蜡笔的小新
    2021-01-11 12:23

    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.

提交回复
热议问题