File tree 3 files changed +11
-5
lines changed
3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1
1
interface IDebugService {
2
- debug ( ) : IFuture < void > ;
2
+ debug ( shouldBreak ?: boolean ) : IFuture < void > ;
3
3
debugStart ( ) : IFuture < void > ;
4
4
platform : string ;
5
5
}
Original file line number Diff line number Diff line change @@ -60,7 +60,6 @@ class IOSDebugService implements IDebugService {
60
60
} else {
61
61
let deploy = this . $platformService . deployOnDevice ( this . platform ) ;
62
62
deploy . wait ( ) ;
63
-
64
63
return this . deviceStart ( ) ;
65
64
}
66
65
}
@@ -76,7 +75,9 @@ class IOSDebugService implements IDebugService {
76
75
private emulatorDebugBrk ( shouldBreak ?: boolean ) : IFuture < void > {
77
76
return ( ( ) => {
78
77
let platformData = this . $platformsData . getPlatformData ( this . platform ) ;
79
- this . $platformService . buildPlatform ( this . platform ) . wait ( ) ;
78
+ if ( ! this . $options . debug ) {
79
+ this . $platformService . buildPlatform ( this . platform ) . wait ( ) ;
80
+ }
80
81
let emulatorPackage = this . $platformService . getLatestApplicationPackageForEmulator ( platformData ) . wait ( ) ;
81
82
82
83
let args = shouldBreak ? "--nativescript-debug-brk" : "--nativescript-debug-start" ;
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ class IOSLiveSyncService extends liveSyncServiceBaseLib.LiveSyncServiceBase<Mobi
15
15
private $injector : IInjector ,
16
16
private $logger : ILogger ,
17
17
private $options : IOptions ,
18
+ private $iOSDebugService : IDebugService ,
18
19
$liveSyncProvider : ILiveSyncProvider ) {
19
20
super ( _device , $liveSyncProvider ) ;
20
21
}
@@ -32,8 +33,12 @@ class IOSLiveSyncService extends liveSyncServiceBaseLib.LiveSyncServiceBase<Mobi
32
33
}
33
34
34
35
protected restartApplication ( deviceAppData : Mobile . IDeviceAppData ) : IFuture < void > {
35
- let projectData : IProjectData = this . $injector . resolve ( "projectData" ) ;
36
- return this . device . applicationManager . restartApplication ( deviceAppData . appIdentifier , projectData . projectName ) ;
36
+ if ( this . $options . debug ) {
37
+ return this . $iOSDebugService . debug ( ) ;
38
+ } else {
39
+ let projectData : IProjectData = this . $injector . resolve ( "projectData" ) ;
40
+ return this . device . applicationManager . restartApplication ( deviceAppData . appIdentifier , projectData . projectName ) ;
41
+ }
37
42
}
38
43
39
44
protected reloadPage ( deviceAppData : Mobile . IDeviceAppData ) : IFuture < void > {
You can’t perform that action at this time.
0 commit comments