@@ -178,57 +178,57 @@ export class PlatformService implements IPlatformService {
178178 platform = platform . toLowerCase ( ) ;
179179
180180 this . preparePlatform ( platform ) . wait ( ) ;
181- if ( options . emulator ) {
181+ if ( options . emulator ) {
182182 this . deployOnEmulator ( platform ) . wait ( ) ;
183183 } else {
184184 this . deployOnDevice ( platform ) . wait ( ) ;
185185 }
186186 } ) . future < void > ( ) ( ) ;
187- }
187+ }
188+
189+ public debugPlatform ( platform : string ) : IFuture < void > {
190+ platform = platform . toLowerCase ( ) ;
188191
189- public debugPlatform ( platform : string ) : IFuture < void > {
190- platform = platform . toLowerCase ( ) ;
192+ var ret = options . emulator
193+ ? this . debugOnEmulator ( platform )
194+ : this . debugOnDevice ( platform ) ;
191195
192- var ret = options . emulator
193- ? this . debugOnEmulator ( platform )
194- : this . debugOnDevice ( platform ) ;
195-
196- return ret ;
197- }
196+ return ret ;
197+ }
198198
199- public debugOnEmulator ( platform : string ) : IFuture < void > {
200- return ( ( ) => {
199+ public debugOnEmulator ( platform : string ) : IFuture < void > {
200+ return ( ( ) => {
201201
202- // a bit redundant
203- this . deployOnEmulator ( platform ) . wait ( ) ;
202+ // a bit redundant
203+ this . deployOnEmulator ( platform ) . wait ( ) ;
204204
205- this . debugOnDevice ( platform ) . wait ( ) ;
206- } ) . future < void > ( ) ( ) ;
207- }
205+ this . debugOnDevice ( platform ) . wait ( ) ;
206+ } ) . future < void > ( ) ( ) ;
207+ }
208208
209- public debugOnDevice ( platform : string ) : IFuture < void > {
210- return ( ( ) => {
211- platform = platform . toLowerCase ( ) ;
209+ public debugOnDevice ( platform : string ) : IFuture < void > {
210+ return ( ( ) => {
211+ platform = platform . toLowerCase ( ) ;
212212
213- var packageFile = "" ;
213+ var packageFile = "" ;
214214
215- if ( options [ "debug-brk" ] ) {
216- this . preparePlatform ( platform ) . wait ( ) ;
215+ if ( options [ "debug-brk" ] ) {
216+ this . preparePlatform ( platform ) . wait ( ) ;
217217
218- var platformData = this . $platformsData . getPlatformData ( platform ) ;
218+ var platformData = this . $platformsData . getPlatformData ( platform ) ;
219219
220- this . buildPlatform ( platform ) . wait ( ) ;
220+ this . buildPlatform ( platform ) . wait ( ) ;
221221
222- packageFile = this . getLatestApplicationPackageForDevice ( platformData ) . wait ( ) . packageName ;
223- this . $logger . out ( "Using " , packageFile ) ;
224- }
222+ packageFile = this . getLatestApplicationPackageForDevice ( platformData ) . wait ( ) . packageName ;
223+ this . $logger . out ( "Using " , packageFile ) ;
224+ }
225225
226- this . $devicesServices . initialize ( { platform : platform , deviceId : options . device } ) . wait ( ) ;
227- var action = ( device : Mobile . IDevice ) : IFuture < void > => { return device . debug ( packageFile , this . $projectData . projectId ) ; } ;
228- this . $devicesServices . execute ( action ) . wait ( ) ;
226+ this . $devicesServices . initialize ( { platform : platform , deviceId : options . device } ) . wait ( ) ;
227+ var action = ( device : Mobile . IDevice ) : IFuture < void > => { return device . debug ( packageFile , this . $projectData . projectId ) ; } ;
228+ this . $devicesServices . execute ( action ) . wait ( ) ;
229229
230- } ) . future < void > ( ) ( ) ;
231- }
230+ } ) . future < void > ( ) ( ) ;
231+ }
232232
233233 public removePlatforms ( platforms : string [ ] ) : IFuture < void > {
234234 return ( ( ) => {
0 commit comments