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

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

Closed
guidezpl opened this issue Apr 13, 2023 · 5 comments
Closed

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

guidezpl opened this issue Apr 13, 2023 · 5 comments
Labels
in debugger Relates to the debug adapter or process of launching a debug session in flutter Relates to running Flutter apps is enhancement
Milestone

Comments

@guidezpl
Copy link
Contributor

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

@DanTup
Copy link
Member

DanTup commented Apr 13, 2023

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).

@DanTup DanTup added the awaiting info Requires more information from the customer to progress label Apr 13, 2023
@guidezpl
Copy link
Contributor Author

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"
        }
    ]
}

@DanTup
Copy link
Member

DanTup commented Apr 17, 2023

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.

@DanTup DanTup added this to the v3.64.0 milestone Apr 17, 2023
@DanTup DanTup added in flutter Relates to running Flutter apps in debugger Relates to the debug adapter or process of launching a debug session and removed awaiting info Requires more information from the customer to progress labels Apr 17, 2023
@DanTup
Copy link
Member

DanTup commented Apr 17, 2023

Fixed by ae5b6ed.

@DanTup DanTup closed this as completed Apr 17, 2023
@guidezpl
Copy link
Contributor Author

Sweet, thanks!

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 enhancement
Projects
None yet
Development

No branches or pull requests

2 participants