You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Include device name in run process / default launch.json #4491
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
In addition, after selecting another device, and running, VS Code complains about an existing app with the same name
Describe the solution you'd like
The name of the running app to reflect the device.
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).
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"
}
]
}
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.
Activity
DanTup commentedon Apr 13, 2023
Can you confirm what you mean by "generated" here? There's no
launch.jsoncreated 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).guidezpl commentedon Apr 13, 2023

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 cumbersomeDanTup commentedon 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 thelaunch.json, since we'll append it to whatever is there.DanTup commentedon Apr 17, 2023
Fixed by ae5b6ed.
guidezpl commentedon Apr 18, 2023
Sweet, thanks!