You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
serviceInfoFile doesn't seem to work for custom flutter embedders #3353
changed the title [-]serviceInfoFile doesn't seem to work for flutter[/-][+]serviceInfoFile doesn't seem to work for custom flutter embedders[/+]on May 18, 2021
The application is not built through the flutter tool so I can't run it using flutter run. flutter attach works, but I need to specify vmServiceUri on every launch.
(down the line it would also be nice to have option for Dart-Code to launch a custom executable with --write-service-info), but for now at least serviceInfoFile working would be a big quality of life improvement.
down the line it would also be nice to have option for Dart-Code to launch a custom executable with --write-service-info
You might be able to do this with a preLaunchTask (eg. cause the debug config to run a background task that spawns the app before it tries to debug) or a compound config (one that runs a Dart script that sets up the file and spawns your process) - I don't know how messy that would be though.
There is also some support for overriding the Flutter/Dart binaries, but it's aimed at some specific Bazel workspace setups so not something official supported for this, but may be another option to improve things until/unless something better is available:
As for the original request - looking at FlutterDebugSession, attachRequest calls launchRequest which calls into DartDebugSession.launchRequest so I don't think it should be complicated to fix this - I suspect there are just some bad assumptions somewhere.
Although this works in my testing with simple Flutter, it's not working for @knopp:
[1:28:22 PM] [FlutterRun] [Info] [Flutter: Attach to Process] Spawning flutter with args ["attach","--machine","-d","macos","--debug-uri","ws://127.0.0.1:60238/40DHMrlkLa0=/ws","--devtools-server-address","http://127.0.0.1:9100/","-v"]
[ +104 ms] Exception attempting to connect to the VM Service: WebSocketException: Connection to 'http://127.0.0.1:60238/40DHMrlkLa0=/ws/ws#' was not upgraded to websocket
The /ws/ws looks suspicious - though it's interesting I'm not seeing that (I did see the URL mangled in a different way though, it ended up with .,/ws on the end - but it still worked). Perhaps something changed in Flutter (I'm on master).
Activity
[-]serviceInfoFile doesn't seem to work for flutter[/-][+]serviceInfoFile doesn't seem to work for custom flutter embedders[/+]knopp commentedon May 18, 2021
The application is not built through the
fluttertool so I can't run it usingflutter run.flutter attachworks, but I need to specifyvmServiceUrion every launch.(down the line it would also be nice to have option for Dart-Code to launch a custom executable with --write-service-info), but for now at least
serviceInfoFileworking would be a big quality of life improvement.DanTup commentedon May 19, 2021
You might be able to do this with a
preLaunchTask(eg. cause the debug config to run a background task that spawns the app before it tries to debug) or a compound config (one that runs a Dart script that sets up the file and spawns your process) - I don't know how messy that would be though.There is also some support for overriding the Flutter/Dart binaries, but it's aimed at some specific Bazel workspace setups so not something official supported for this, but may be another option to improve things until/unless something better is available:
Dart-Code/src/shared/utils/workspace.ts
Lines 57 to 69 in 195b1c6
As for the original request - looking at
FlutterDebugSession,attachRequestcallslaunchRequestwhich calls intoDartDebugSession.launchRequestso I don't think it should be complicated to fix this - I suspect there are just some bad assumptions somewhere.DanTup commentedon May 19, 2021
Although this works in my testing with simple Flutter, it's not working for @knopp:
The
/ws/wslooks suspicious - though it's interesting I'm not seeing that (I did see the URL mangled in a different way though, it ended up with.,/wson the end - but it still worked). Perhaps something changed in Flutter (I'm onmaster).[flutter_tools] Add support for vmServiceFileInfo when attaching (#12…