Skip to content

Include device names in generated launch configs for Select & Start Debugging #3937

Closed

Description

@guidezpl

Is your feature request related to a problem? Please describe.
Currently, when running multiple instances (e.g. on multiple devices), they are simply numbered, making it hard to identify which one is which.

Describe the solution you'd like
Specify the device name in parens such that it shows up in the running instance selector.

Screen Shot 2022-04-21 at 13 14 34

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on Apr 21, 2022
  2. DanTup commented on Apr 21, 2022

    @DanTup
    Member

    How are you starting the debug sessions? Do you have a launch.json?

    Without a launch.json, starting with F5 or the Run menu, the device ID should already be added:

    Screenshot 2022-04-21 at 14 41 07

    If you have a launch.json or launch through another means, things may be a little different. I'm not sure it would make sense to overwrite the name supplied in a launch.json. We could perhaps support some variable $deviceName or something, although it would show literally as the variable in many places in VS Code's UI (like the sidebar) where it's not been replaced as part of launching a debug session 🤔

  3. added
    awaiting infoRequires more information from the customer to progress
    on Apr 21, 2022
  4. added this to the v3.40.0 milestone on Apr 21, 2022
  5. added
    in flutterRelates to running Flutter apps
    in debuggingRelates to the debug adapter or process of running debug sessions
    on Apr 21, 2022
  6. guidezpl commented on Apr 21, 2022

    @guidezpl
    ContributorAuthor

    Oh, neat I didn't know it was already working in some cases.

    I don't have a launch.json, I'm selecting "Select and start debug configuration" in the bottom bar and then selecting Flutter
    Screen Shot 2022-04-21 at 16 34 50

  7. removed
    awaiting infoRequires more information from the customer to progress
    on Apr 21, 2022
  8. changed the title [-]Specify device name when running multiple instances[/-] [+]Include device names in generated launch configs for Select & Start Debugging[/+] on Apr 21, 2022
  9. DanTup commented on Apr 21, 2022

    @DanTup
    Member

    I can't make the name dynamic there (if I do, when you change device and then try to run from that "recently used" list, it will error, because it uses the name to look it up in the list again), but I was able to add a new entry for each supported device to the top of the list:

    Screenshot 2022-04-21 at 16 27 41

    Since these don't change when you change your selected device, these will still work from the recently used list (which is the top entry in your screenshot, where you haven't gone into the "Dart & Flutter" section):

    Screenshot 2022-04-21 at 16 27 50

  10. guidezpl commented on Apr 21, 2022

    @guidezpl
    ContributorAuthor

    Sweet, thanks!

  11. DanTup commented on Apr 28, 2022

    @DanTup
    Member

    Just an FYI, I noticed some weirdness where pressing F5 in a project without a launch.json would sometimes run on the wrong device. It's either related to VS Code being clever and picking the most recent thing I picked from Select&Start Debugging, or the top one from the list (but it seemed quite inconsistent). In case it's the latter, I'm changing these device-specific ones to appear in the list after the original one (which runs on the "current" device).

  12. guidezpl commented on Apr 28, 2022

    @guidezpl
    ContributorAuthor

    Ack.

  13. added a commit that references this issue on Sep 2, 2025
    0710d18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in debuggingRelates to the debug adapter or process of running debug sessionsin flutterRelates to running Flutter appsis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions