-
-
Notifications
You must be signed in to change notification settings - Fork 197
CLI not directing the commands correctly to the correct device/emulator #1765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We already received some issues regarding this incorrect behavior outlining the expectations of the users nativescript-community/nativescript-vscode-extension#38 |
@blagoev |
maybe Genymotion |
@rosen-vladimirov The best way of targeting the emulator is by not "recognizing it" but by redirecting communication to it. Similar how adb does it. https://github.com/android/platform_system_core/blob/master/adb/commandline.cpp#L1480 In our case this "targeting" means passing "-e" to all adb commands that correlate to the executed "tns xyz" command |
Using |
Not valid with the latest VS Code run options |
Currently some emulators are not recongnized as emulators and CLI is not working correctly with them
The problem manifests itself in VS Code where there are two options for debug "Launch on Android Device" and "Launch on Android Emulator". In other words there is no way for the user to use plain commands like "tns debug android" and is always specifying --emulator or --device.
The problem is the user is required to use "Launch on Android Device" for some emulators (Visual Studio Android Emulator is one) in order to get the debug session working.
For every command the CLI receives it issues multiple adb commands to the device. The correct way to work is to respect the "--emulator" given to the tns command and use "adb -e" for every adb command send to the device. This way all Android emulators will work correctly and the user will be happy selecting "Launch on Android Emulator" as expected.
this is somewhat related to #1763 since this will fix it.
The text was updated successfully, but these errors were encountered: