28 October 2023

Could not start Dart VM service HTTP server

Environment:

Visual Studio Code v1.83.1


Symtomps:

1). When you try to debug your Flutter project, you see this error message at the Terminal "Could not start Dart VM service HTTP server"


2). You will also notice that the Hot Reload, Hot Restart are all gone!


Solution:

a). Please go to <Your_Project_Path>\android\app\src\debug folder, confirm if you have AndroidManifest.xml in that debug folder.

b). Go to <Your_Project_Path>android\app\src\profile folder, copy AndroidManifest.xml and paste it to the debug folder at Step [a].

c). Type 'flutter run' at Terminal and Hot Reload, Hot Restart should work now.



Explanation at Flutter Docs did mention how Dart VM service work with that Hot Reload and Hot Restart features. Refer https://docs.flutter.dev/tools/vs-code#hot-reload-vs-hot-restart


Happy coding!