Skip to content

Include device name in run process / default launch.json #4491

Closed

Description

@guidezpl

Is your feature request related to a problem? Please describe.

When running the same app on multiple devices (in this case, using the default generated launch.json), it's impossible to distinguish between the different instances
image
In addition, after selecting another device, and running, VS Code complains about an existing app with the same name
image

Describe the solution you'd like
The name of the running app to reflect the device.

Describe alternatives you've considered
N/A

Activity

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

    @DanTup
    Member

    in this case, using the default generated launch.json

    Can you confirm what you mean by "generated" here? There's no launch.json created by default (you can run apps without one), but there are a few ways you can trigger them to be created (or be populated). Device names should be included automatically in at least some of those places (eg. #3937).

  3. added
    awaiting infoRequires more information from the customer to progress
    on Apr 13, 2023
  4. guidezpl commented on Apr 13, 2023

    @guidezpl
    ContributorAuthor

    image

    From the Run and Debug panel, if you click "create a launch.json file" and then "Dart & Flutter" you get a generic file that makes running an app on multiple devices more cumbersome
    {
        // Use IntelliSense to learn about possible attributes.
        // Hover to view descriptions of existing attributes.
        // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
        "version": "0.2.0",
        "configurations": [
            {
                "name": "flutter_repro_app",
                "request": "launch",
                "type": "dart"
            },
            {
                "name": "flutter_repro_app (profile mode)",
                "request": "launch",
                "type": "dart",
                "flutterMode": "profile"
            },
            {
                "name": "flutter_repro_app (release mode)",
                "request": "launch",
                "type": "dart",
                "flutterMode": "release"
            }
        ]
    }
    
  5. DanTup commented on Apr 17, 2023

    @DanTup
    Member

    It used to be the case that we'd only automatically add the device name into the session name if it didn't already have one (eg. if you deleted launch.json and just pressed F5).

    I've changed this now so as long as your launch config doesn't have an explicit deviceId, we'll always add the device name onto the end. There's no change to the launch.json, since we'll append it to whatever is there.

  6. added this to the v3.64.0 milestone on Apr 17, 2023
  7. added
    in flutterRelates to running Flutter apps
    in debuggingRelates to the debug adapter or process of running debug sessions
    and removed
    awaiting infoRequires more information from the customer to progress
    on Apr 17, 2023
  8. DanTup commented on Apr 17, 2023

    @DanTup
    Member

    Fixed by ae5b6ed.

  9. guidezpl commented on Apr 18, 2023

    @guidezpl
    ContributorAuthor

    Sweet, thanks!

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