I am trying, and failing, to debug Nativescript demo application via Visual Studio Code using latest Nativescript plugin. Also, I use Genymotion emulator ..
This is my launch.json:
{
"name": "Launch on Android",
"type": "nativescript",
"platform": "android",
"request": "launch",
"appRoot": "${workspaceRoot}",
"sourceMaps": true,
"diagnosticLogging": false,
"emulator": false,
"rebuild": true,
"tnsArgs": [
"--device 1"
]
},
and this is what I get for result:
Cannot resolve the specified connected device by the provided index or identifier. To list currently connected devices and verify that the specified index or identifier exists, run 'tns device'.
Running tns device from terminal:
┌───┬─────────────┬──────────┬─────────────────────┬──────────┬───────────┐
│ # │ Device Name │ Platform │ Device Identifier │ Type │ Status │
│ 1 │ vbox86p │ Android │ 192.168.56.101:5555 │ Emulator │ Connected │
└───┴─────────────┴──────────┴─────────────────────┴──────────┴───────────┘
So far I tried the following:
However, I can run or livesync application normally via terminal, but the same doesn't work in Visual Studio Code.
The solution wast to use default AVD emulator as @Nikolay Tsonev mentioned.