Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmServiceInfoFile does not work with Flutter SDK debug adapter #4577

Closed
knopp opened this issue Jun 7, 2023 · 2 comments · Fixed by flutter/flutter#128503
Closed

vmServiceInfoFile does not work with Flutter SDK debug adapter #4577

knopp opened this issue Jun 7, 2023 · 2 comments · Fixed by flutter/flutter#128503
Labels
in debugger Relates to the debug adapter or process of launching a debug session in flutter Relates to running Flutter apps is bug relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available
Milestone

Comments

@knopp
Copy link

knopp commented Jun 7, 2023

Content of the vmService file:

{
  "uri": "http://127.0.0.1:59168/t1E27KPVN5w=/"
}%      

logs-new-adapter (not working).txt

logs-old-adapter (working).txt

@knopp knopp added the is bug label Jun 7, 2023
DanTup added a commit to DanTup/flutter that referenced this issue Jun 8, 2023
When building the new SDK DAPs, this functionality was missed from the Flutter adapter (but added to the Dart CLI adapter).

As well as passing a VM Service URI directly, we support passing a file that can be polled for it.

This uses the same mechanism we use to obtain the VM Service URI from a Dart debug session (we run "dart --write-service-info=foo.json my_file.dart" and then poll that file) and is useful for users that have their own mechanism for launching an app (for example using custom Flutter embedders - see Dart-Code/Dart-Code#3353) to provide a VM Service URI once the app is up and running.

Fixes Dart-Code/Dart-Code#4577.
@DanTup DanTup added this to the v3.68.0 milestone Jun 8, 2023
@DanTup DanTup added in debugger Relates to the debug adapter or process of launching a debug session relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available in flutter Relates to running Flutter apps labels Jun 8, 2023
@DanTup DanTup changed the title vmServiceInfo file not working with new debugging adapter vmServiceInfoFile does not work with Flutter SDK debug adapter Jun 8, 2023
@DanTup
Copy link
Member

DanTup commented Jun 8, 2023

Seems vmServiceInfoFile was only wired up for Dart in the new adapters. I've opened a PR to add this to Flutter at flutter/flutter#128503.

auto-submit bot pushed a commit to flutter/flutter that referenced this issue Jun 16, 2023
…8503)

When building the new SDK DAPs, this functionality was missed from the Flutter adapter (but added to the Dart CLI adapter).

As well as passing a VM Service URI directly, we support passing a file that can be polled for it.

This uses the same mechanism we use to obtain the VM Service URI from a Dart debug session (we run `dart --write-service-info=foo.json my_file.dart` and then poll that file which the VM will write) and is useful for users that have their own mechanism for launching an app (for example using custom Flutter embedders - see Dart-Code/Dart-Code#3353) to provide a VM Service URI once the app is up and running.

Fixes Dart-Code/Dart-Code#4577.
@DanTup
Copy link
Member

DanTup commented Jun 19, 2023

The fix was merged into Flutter and will be available in a future SDK release (it's already available on master if you'd like to test it there).

@DanTup DanTup closed this as completed Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in debugger Relates to the debug adapter or process of launching a debug session in flutter Relates to running Flutter apps is bug relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants