-
Notifications
You must be signed in to change notification settings - Fork 344
Description
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 devicesto see connected devices - Configure launch.json with device ID as shown in the example
- Attempt to run the application via VS Code debugger
Example flutter devices output:
➜ ~ flutter devices
Found 4 connected devices:
PLK110 (mobile) • 3B15AN013GM00000 • android-arm64 • Android 16 (API 36)
PLK110 (mobile) • 10.205.1.239:5555 • android-arm64 • Android 16 (API 36)
macOS (desktop) • macos • darwin-arm64 • macOS 26.2 25C56
darwin-arm64
Chrome (web) • chrome • web-javascript • Google Chrome
143.0.7499.169
Example launch.json configuration:
{
"version": "0.2.0",
"configurations": [
{
"name": "One Plus 15",
"request": "launch",
"type": "dart",
"deviceId": "PLK110",
},
]
}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.