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
No longer able to specify devices by partial name in deviceId field in launch.json #5854
Title: Unable to specify Android device ID via launch.json in VS Code for Flutter development
Describe the bug
Starting from a certain version, it has become impossible to run applications by specifying Android device IDs via launch.json in VS Code.
To Reproduce
Steps to reproduce the behavior:
Connect Android devices (both wired and wireless)
Run flutter devices to see connected devices
Configure launch.json with device ID as shown in the example
Attempt to run the application via VS Code debugger
Expected behavior
The application should run on the specified device using the device name (e.g., "PLK110") as the deviceId in launch.json, as it worked in previous versions.
Current behavior
Regardless of whether the device is connected via wireless or wired connection, the application cannot be run by specifying the device ID in launch.json. The following error occurs:
Device "PLK110 (mobile)" was not found
Currently, the deviceId must be specified as either "3B15AN013GM00000" or "10.205.1.239:5555" (the full device identifier), whereas in previous versions this was not required.
Please complete the following information:
You can run the Dart: Collect Diagnostic Information command from the VS Code command palette (F1) to easily capture this information or provide it manually.
Operating System and version: macOS
VS Code version: 1.107.1
Dart extension version: 3.124.1
Dart/Flutter SDK version: 3.10.3/3.38.4
Target device: Android devices (OnePlus PLK110)
Additional context
This appears to be a regression from a previous version where specifying the device name (e.g., "PLK110") as deviceId in launch.json worked correctly. Now it requires the full device identifier instead.
logger.warn(`Unable to launch because device ${debugConfig.deviceId} could not be found`);
voidwindow.showInformationMessage(`Device "${debugConfig.deviceId}" was not found`);
return"UNABLE_TO_LAUNCH";
}
Before, we probably just passed the ID through to Flutter, and flutter run accepts the device name as well as the ID (as long as it's unique), but this change assumed we were only ever using IDs.
We should update this code so that if it doesn't find a device by ID, it does the same substring match as Flutter, and if there's only one match, then it selects that ID.
changed the title [-]Unable to specify Android device ID via launch.json in VS Code[/-][+]No longer able to specify devices by name in `deviceId` field in launch.json[/+]on Dec 22, 2025
changed the title [-]No longer able to specify devices by name in `deviceId` field in launch.json[/-][+]No longer able to specify devices by partial name in `deviceId` field in launch.json[/+]on Dec 22, 2025
Activity
DanTup commentedon Dec 22, 2025
Thanks for the report!
I suspect this happened in 5f757e4, where this code was added:
Dart-Code/src/extension/providers/debug_config_provider.ts
Lines 302 to 307 in 27900a0
Before, we probably just passed the ID through to Flutter, and
flutter runaccepts the device name as well as the ID (as long as it's unique), but this change assumed we were only ever using IDs.We should update this code so that if it doesn't find a device by ID, it does the same substring match as Flutter, and if there's only one match, then it selects that ID.
[-]Unable to specify Android device ID via launch.json in VS Code[/-][+]No longer able to specify devices by name in `deviceId` field in launch.json[/+][-]No longer able to specify devices by name in `deviceId` field in launch.json[/-][+]No longer able to specify devices by partial name in `deviceId` field in launch.json[/+]Support fuzzy-matching of devices/emulators in launch config/autolaunch