-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
Since hot reload is not supported, and hot restart works only once per build I wanted to workaround that by running the app from terminal which supports hot reload and hot restart. And then attach debugger to that running process.
But I wasn't able to do that.
Here is my task
{
"label": "Run Dev",
"command": "flutter run --debug --dart-define-from-file=environments/dev.json --disable-service-auth-codes --vm-service-port=50300",
"use_new_terminal": true
}Output:
A Dart VM Service on sdk gphone64 x86 64 is available at: http://127.0.0.1:50300/
The Flutter DevTools debugger and profiler on sdk gphone64 x86 64 is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:50300/
Then I try to attach the debugger:
{
"adapter": "Dart",
"label": "Dart Attach",
"program": "lib/main.dart",
"type": "flutter",
"request": "attach",
"vmServiceUri": "http://127.0.0.1:50300", // also tried ws://127.0.0.1:50300 and ws://127.0.0.1:50300/ws
},And every time I get the same error:
Error connecting to the service protocol: failed to connect to http://127.0.0.1:40329/ HttpException: Connection closed before full header was received, uri = http://127.0.0.1:40329/ws
Except that port in that error every time is different.
At the same point I'm able to open devtools from running the task, so the port is working. And the app runs of course
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels