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
Debug on emulator by default when multiple devices/emulators attached (#2957)
When there are multiple devices/emulators, calling `tns debug android` will fail that multiple devices are attached.
This break VS Code as previous code of CLI has been using emulators by default.
Fix this by using the most recent version (highest API Level) of running emulators, 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 the terminal is interactive, CLI will prompt the user for selecting a device on which to start debug operation.
In case the terminal is not interactive and there's no emulator running, the device with highest API level will be used.
// Do not dispose ios-device-lib, so the process will remain alive and the debug application (NativeScript Inspector or Chrome DevTools) will be able to connect to the socket.
118
170
// In case we dispose ios-device-lib, the socket will be closed and the code will fail when the debug application tries to read/send data to device socket.
119
171
// That's why the `$ tns debug ios --justlaunch` command will not release the terminal.
@@ -146,9 +198,10 @@ export class DebugAndroidCommand extends DebugPlatformCommand {
publicstaticUNABLE_TO_USE_FOR_DEVICE_AND_EMULATOR="The options --for-device and --emulator cannot be used simultaneously. Please use only one of them.";
93
+
publicstaticNO_DEVICES_EMULATORS_FOUND_FOR_OPTIONS="Unable to find device or emulator for specified options.";
0 commit comments