From 1c8af5f7d503bd1a078796c4614fbd03bbaea1e5 Mon Sep 17 00:00:00 2001 From: fatme Date: Tue, 25 Jun 2019 17:30:37 +0300 Subject: [PATCH] fix: fix test command with `--debug-brk` option Device discovery was not started on test command when debug-brk option is provided. This led to the error "Unable to find device or emulator for specified options.". --- lib/commands/test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/commands/test.ts b/lib/commands/test.ts index abe1502d5f..1641227d28 100644 --- a/lib/commands/test.ts +++ b/lib/commands/test.ts @@ -14,6 +14,14 @@ abstract class TestCommandBase { async execute(args: string[]): Promise { let devices = []; if (this.$options.debugBrk) { + await this.$devicesService.initialize({ + platform: this.platform, + deviceId: this.$options.device, + emulator: this.$options.emulator, + skipInferPlatform: !this.platform, + sdk: this.$options.sdk + }); + const selectedDeviceForDebug = await this.$devicesService.pickSingleDevice({ onlyEmulators: this.$options.emulator, onlyDevices: this.$options.forDevice,