Skip to content

Commit 1b2082b

Browse files
Fix not starting emulator during debug command
`tns debug <platform>` command should start emulator in case device is not attached. The current command does not start emulator as we have passed `skipInferPlatform` - when this option is used, devicesService does not know for which platform to start the emulator. Fix this by passing correct options.
1 parent 761fc4e commit 1b2082b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/commands/debug.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export abstract class DebugPlatformCommand implements ICommand {
1+
export abstract class DebugPlatformCommand implements ICommand {
22
public allowedParameters: ICommandParameter[] = [];
33
public platform: string;
44

@@ -29,9 +29,6 @@
2929

3030
this.$config.debugLivesync = true;
3131

32-
await this.$devicesService.initialize({
33-
34-
});
3532
await this.$devicesService.detectCurrentlyAttachedDevices();
3633

3734
const devices = this.$devicesService.getDeviceInstances();
@@ -86,9 +83,9 @@
8683
platform: this.platform,
8784
deviceId: this.$options.device,
8885
emulator: this.$options.emulator,
89-
skipDeviceDetectionInterval: true,
90-
skipInferPlatform: true
86+
skipDeviceDetectionInterval: true
9187
});
88+
9289
// Start emulator if --emulator is selected or no devices found.
9390
if (this.$options.emulator || this.$devicesService.deviceCount === 0) {
9491
return true;

0 commit comments

Comments
 (0)