Skip to content

Support "Debug: Attach to Flutter Process" workflow for desktop #1638

@stuartmorgan-g

Description

@stuartmorgan-g

STR:

  • Set ENABLE_FLUTTER_DESKTOP to true in dart.env
  • Clone https://github.com/google/flutter-desktop-embedding.git
  • Open flutter-desktop-embedding/example in VS Code
  • From a terminal, flutter run in flutter-desktop-embedding/example to launch the process outside of VS Code
  • Attempt to attach with Debug: Attach to Flutter Process

The desired behavior in this case is to prompt for a URI, but instead it goes directly into a mode where it waits for a connection (based on previous discussion, it sounds like it's scanning for a log message that's never going to arrive).

I have tested with a launch.json config using the URI (using 2.26b1) and it works fine, but that's a fairly painful process now that the auth token system prevents just hard-coding an observatory URI in both the app and the config and leaving it alone; every new run requires editing the launch.json again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in desktopRelates to running Flutter desktop appsin flutterRelates to running Flutter appsis enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions