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
Currently CLI automatically selects which device/emulator to be used for debugging in case there's more than one device/emulator running. Instead of automatic selection, we should ask the user what they want to do.
Here's the idea:
In case the terminal is interactive and there are more than one devices/emulators running, prompt the user to select device for debugging.
In case the terminal is interactive and --emulator is passed, the prompter should contain only currently running emulators. In case there's no running emulators, CLI will start one and it will be used for debugging.
In case terminal is interactive and --for-device is passed, the prompter should contain only currently attached devices (no emulators/simulators). In case there's no attached devices, CLI will fail.
In case the terminal is not interactive and there are more than one devices/emulators, CLI will use the emulator with highest API version, i.e. in case you have three Android emulators with version 5.1, 6.0 and 7.0, the one with 7.0 will be used for debugging. In case there are no emulators running, but multiple devices are attached, CLI will use the device with highest API Level.
In case the terminal is not interactive and there are more than one emulators and --emulator flag is passed, CLI will use the emulator with highest API Level. In case there's no running emulator, CLI will start one and use it for debugging.
In case the terminal is not interactive and there are more than one devices attached and --for-device flag is passed, CLI will use the device with highest API Level. In case there's no device attached for specified platform, CLI will fail.
NOTE: In all scenarios only Trusted devices for specified platform are counted, i.e. in case you have Android device attached, that is not trusted and another Android device, that's ready for debugging, only the second one will be considered. The first one is not taken into action.
Which platform(s) does your issue occur on?
Both
Please provide the following version numbers that your issue occurs with:
CLI: 3.x.x
The text was updated successfully, but these errors were encountered:
Part of these features were implemented after this PR.
Find more information here
In short you can debug specific devices by running: tns debug <platform> --device <id>
and <id> can be found by running: tns device <platform> --available-devices
Tell us about the problem
Currently CLI automatically selects which device/emulator to be used for debugging in case there's more than one device/emulator running. Instead of automatic selection, we should ask the user what they want to do.
Here's the idea:
In case the terminal is interactive and there are more than one devices/emulators running, prompt the user to select device for debugging.
In case the terminal is interactive and
--emulator
is passed, the prompter should contain only currently running emulators. In case there's no running emulators, CLI will start one and it will be used for debugging.In case terminal is interactive and
--for-device
is passed, the prompter should contain only currently attached devices (no emulators/simulators). In case there's no attached devices, CLI will fail.In case the terminal is not interactive and there are more than one devices/emulators, CLI will use the emulator with highest API version, i.e. in case you have three Android emulators with version 5.1, 6.0 and 7.0, the one with 7.0 will be used for debugging. In case there are no emulators running, but multiple devices are attached, CLI will use the device with highest API Level.
In case the terminal is not interactive and there are more than one emulators and
--emulator
flag is passed, CLI will use the emulator with highest API Level. In case there's no running emulator, CLI will start one and use it for debugging.In case the terminal is not interactive and there are more than one devices attached and
--for-device
flag is passed, CLI will use the device with highest API Level. In case there's no device attached for specified platform, CLI will fail.NOTE: In all scenarios only Trusted devices for specified platform are counted, i.e. in case you have Android device attached, that is not trusted and another Android device, that's ready for debugging, only the second one will be considered. The first one is not taken into action.
Which platform(s) does your issue occur on?
Both
Please provide the following version numbers that your issue occurs with:
The text was updated successfully, but these errors were encountered: