|
1 | 1 | export class DebugPlatformCommand implements ICommand { |
2 | 2 | constructor(private debugService: IDebugService, |
3 | 3 | private $devicesService: Mobile.IDevicesService, |
| 4 | + private $usbLiveSyncService: ILiveSyncService, |
4 | 5 | private $logger: ILogger, |
5 | 6 | protected $options: IOptions) { } |
6 | 7 |
|
7 | 8 | execute(args: string[]): IFuture<void> { |
| 9 | + if (!this.$options.rebuild) { |
| 10 | + this.$options.debug = true; |
| 11 | + return this.$usbLiveSyncService.liveSync(this.$devicesService.platform); |
| 12 | + } |
8 | 13 | return this.debugService.debug(); |
9 | 14 | } |
10 | 15 |
|
|
33 | 38 | export class DebugIOSCommand extends DebugPlatformCommand { |
34 | 39 | constructor($iOSDebugService: IDebugService, |
35 | 40 | $devicesService: Mobile.IDevicesService, |
| 41 | + $usbLiveSyncService: ILiveSyncService, |
36 | 42 | $logger: ILogger, |
37 | 43 | $options: IOptions) { |
38 | | - super($iOSDebugService, $devicesService, $logger, $options); |
| 44 | + super($iOSDebugService, $devicesService, $usbLiveSyncService, $logger, $options); |
39 | 45 | } |
40 | 46 | } |
41 | 47 | $injector.registerCommand("debug|ios", DebugIOSCommand); |
42 | 48 |
|
43 | 49 | export class DebugAndroidCommand extends DebugPlatformCommand { |
44 | 50 | constructor($androidDebugService: IDebugService, |
45 | 51 | $devicesService: Mobile.IDevicesService, |
| 52 | + $usbLiveSyncService: ILiveSyncService, |
46 | 53 | $logger: ILogger, |
47 | 54 | $options: IOptions) { |
48 | | - super($androidDebugService, $devicesService, $logger, $options); |
| 55 | + super($androidDebugService, $devicesService, $usbLiveSyncService, $logger, $options); |
49 | 56 | } |
50 | 57 | } |
51 | 58 | $injector.registerCommand("debug|android", DebugAndroidCommand); |
0 commit comments