Skip to content

Commit 1c8af5f

Browse files
committed
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.".
1 parent fb5f155 commit 1c8af5f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/commands/test.ts

+8
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ abstract class TestCommandBase {
1414
async execute(args: string[]): Promise<void> {
1515
let devices = [];
1616
if (this.$options.debugBrk) {
17+
await this.$devicesService.initialize({
18+
platform: this.platform,
19+
deviceId: this.$options.device,
20+
emulator: this.$options.emulator,
21+
skipInferPlatform: !this.platform,
22+
sdk: this.$options.sdk
23+
});
24+
1725
const selectedDeviceForDebug = await this.$devicesService.pickSingleDevice({
1826
onlyEmulators: this.$options.emulator,
1927
onlyDevices: this.$options.forDevice,

0 commit comments

Comments
 (0)