nativescript-community / nativescript-vscode-extension

A Visual Studio Code Extension for NativeScript
https://www.nativescript.org/visual-studio-code
Apache License 2.0
82 stars 32 forks source link

Any way to specify which AVD to use when on Android emulator? #200

Closed theremon closed 6 years ago

theremon commented 6 years ago

Hi

hitting F5 in VSCode to start debugging (or even with tns run), starts the emulator with an image I don't want to actually use (and don't know neither why it's selected nor how to set another 'default'). Is there any way to set the desired AVD in launch.json or any other config file?

Thanks in advance

ivanovit commented 6 years ago

Hi,

You can pass extra arguments to the tns CLI using the tnsArgs options in your launch.json. The tns run command has --device parameter where you can specify which avd to start.

Example tnsArgs:

"tnsArgs": [
    "--device",
    "AVD_Name"
]

Also you could start the emulator before debugging. In this case the tns command will use the running emulator without starting a new one.

Please let us know if this solution works for you.

ivanovit commented 6 years ago

Closing the issue. If need any further information you could reopen it.