diff --git a/lib/commands/debug.ts b/lib/commands/debug.ts index b0322844f6..144ae61d23 100644 --- a/lib/commands/debug.ts +++ b/lib/commands/debug.ts @@ -29,14 +29,15 @@ export class DebugPlatformCommand implements ICommand { await this.$platformService.trackProjectType(this.$projectData); + const selectedDeviceForDebug = await this.getDeviceForDebug(); + debugData.deviceIdentifier = selectedDeviceForDebug.deviceInfo.identifier; + if (this.$options.start) { return this.$debugLiveSyncService.printDebugInformation(await this.debugService.debug(debugData, debugOptions)); } this.$config.debugLivesync = true; - const selectedDeviceForDebug = await this.getDeviceForDebug(); - await this.$devicesService.detectCurrentlyAttachedDevices({ shouldReturnImmediateResult: false, platform: this.platform }); await this.$liveSyncCommandHelper.executeLiveSyncOperation([selectedDeviceForDebug], this.$debugLiveSyncService, this.platform);