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

Debug - Can only start Dart VM service, not observatory #380

Closed
jvieira88 opened this issue Aug 23, 2023 · 1 comment
Closed

Debug - Can only start Dart VM service, not observatory #380

jvieira88 opened this issue Aug 23, 2023 · 1 comment
Labels
question Further information is requested

Comments

@jvieira88
Copy link

jvieira88 commented Aug 23, 2023

Hi,

I'm trying to debug an application running on a x64 machine, but I'm getting a similar behaviour with an arm64 so I think I must be doing something wrong. I've been trying to follow the documentation to get this going but once I start running the application using the flutter-client and pointing at the bundle path, I get a message flutter: The Dart VM service is listening on http://127.0.0.1:12345/, while looking at the documentation I was expecting to see something like flutter: Observatory listening on http://127.0.0.1:12345/. With the Dart VM I cannot actually debug the application.

I'm sure I'm doing something wrong but couldn't quite figure out what it is. I'll briefly detail the steps I followed bellow in the hope someone knows what's wrong.

1- Get and build flutter-embedded-linux, building for Wayland backend (Stand-alone Wayland app).

cd /opt
git clone https://github.com/sony/flutter-embedded-linux.git
cd /opt/flutter-embedded-linux
mkdir build
cd build
wget https://github.com/sony/flutter-embedded-linux/releases/download/1ac611c64e/elinux-x64-debug.zip
unzip ./elinux-x64-debug.zip
cmake -DUSER_PROJECT_PATH=examples/flutter-wayland-client -DCMAKE_BUILD_TYPE=Release ..
cmake --build .

This results in having the flutter-client and the flutter-elinux artifacts for debug in /opt/flutter-embedded-linux/build.

2- Build the application in debug mode from within the application workspace.
export PATH=$PATH:/opt/flutter-elinux/bin && FLUTTER_ELINUX_CUSTOM_RUN_ARGS=\"--width=480 --height=800\" flutter-elinux run -d elinux-wayland --disable-service-auth-codes --device-vmservice-port=12345 --host-vmservice-port=42771

This results in a bundle folder being created. This does show the following message but I'm trying to debug using the bundled application:

A Dart VM Service on eLinux is available at: http://127.0.0.1:42771/
The Flutter DevTools debugger and profiler on eLinux is available at: http://127.0.0.1:9101?uri=http://127.0.0.1:42771/

3- Run the bundled application (in debug) using the flutter-client:
export PATH=$PATH:/opt/flutter-elinux/bin && export PATH=$PATH:/opt/flutter-embedded-linux/build && LD_LIBRARY_PATH=/opt/flutter-embedded-linux/build/ FLUTTER_ENGINE_SWITCHES=2 FLUTTER_ENGINE_SWITCH_1="observatory-port=12345" FLUTTER_ENGINE_SWITCH_2="disable-service-auth-codes" /opt/flutter-embedded-linux/build/flutter-client --bundle=/home/jv/projects/FlutterElinuxAgraPro/agra_pro/build/elinux/x64/debug/bundle

This prints a message flutter: The Dart VM service is listening on http://127.0.0.1:12345/ but gives no access to Flutter DevTools debugger.

@HidenoriMatsubayashi HidenoriMatsubayashi added the question Further information is requested label Aug 23, 2023
@HidenoriMatsubayashi
Copy link
Contributor

HidenoriMatsubayashi commented Aug 23, 2023

I'm not sure what you want to do and why you don't use flutter-elinux tool. To get the following log, you have to use flutter tools (dart code). But, I think you can use A Dart VM Service on eLinux is available at: http://127.0.0.1:42771/ as observatoryUri.

The Flutter DevTools debugger and profiler on eLinux is available at: http://127.0.0.1:9101?uri=http://127.0.0.1:42771/

Thanks. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants