@@ -8,6 +8,7 @@ import { getPidFromiOSSimulatorLogs } from "../common/helpers";
88const inspectorAppName = "NativeScript Inspector.app" ;
99const inspectorNpmPackageName = "tns-ios-inspector" ;
1010const inspectorUiDir = "WebInspectorUI/" ;
11+ import { performanceLog } from "../common/decorators" ;
1112
1213export class IOSDeviceDebugService extends DebugServiceBase implements IDeviceDebugService {
1314 private _lldbProcess : ChildProcess ;
@@ -38,6 +39,7 @@ export class IOSDeviceDebugService extends DebugServiceBase implements IDeviceDe
3839 return "ios" ;
3940 }
4041
42+ @performanceLog ( )
4143 public async debug ( debugData : IDebugData , debugOptions : IDebugOptions ) : Promise < IDebugResultInfo > {
4244 const result : IDebugResultInfo = { hasReconnected : false , debugUrl : null } ;
4345 this . validateOptions ( debugOptions ) ;
@@ -79,6 +81,7 @@ export class IOSDeviceDebugService extends DebugServiceBase implements IDeviceDe
7981 }
8082 }
8183
84+ @performanceLog ( )
8285 private async startDeviceLogProcess ( debugData : IDebugData , debugOptions : IDebugOptions ) : Promise < void > {
8386 if ( debugOptions . justlaunch ) {
8487 // No logs should be printed on console when `--justlaunch` option is passed.
@@ -99,6 +102,7 @@ export class IOSDeviceDebugService extends DebugServiceBase implements IDeviceDe
99102 await this . device . openDeviceLogStream ( { predicate : IOS_LOG_PREDICATE } ) ;
100103 }
101104
105+ @performanceLog ( )
102106 private async startAppOnSimulator ( debugData : IDebugData , debugOptions : IDebugOptions ) : Promise < void > {
103107 const args = debugOptions . debugBrk ? "--nativescript-debug-brk" : "--nativescript-debug-start" ;
104108 const launchResult = await this . $iOSEmulatorServices . runApplicationOnEmulator ( debugData . pathToAppPackage , {
@@ -116,6 +120,7 @@ export class IOSDeviceDebugService extends DebugServiceBase implements IDeviceDe
116120 this . startAppDebuggerOnSimulator ( pid ) ;
117121 }
118122
123+ @performanceLog ( )
119124 private async startAppOnDevice ( debugData : IDebugData , debugOptions : IDebugOptions ) : Promise < void > {
120125 const runOptions : IRunPlatformOptions = {
121126 device : this . deviceIdentifier ,
@@ -152,6 +157,7 @@ export class IOSDeviceDebugService extends DebugServiceBase implements IDeviceDe
152157 }
153158 }
154159
160+ @performanceLog ( )
155161 private async wireDebuggerClient ( debugData : IDebugData , debugOptions : IDebugOptions ) : Promise < string > {
156162 if ( ( debugOptions . inspector || ! debugOptions . client ) && this . $hostInfo . isDarwin ) {
157163 return await this . setupTcpAppDebugProxy ( debugData , debugOptions ) ;
@@ -184,6 +190,7 @@ export class IOSDeviceDebugService extends DebugServiceBase implements IDeviceDe
184190 return null ;
185191 }
186192
193+ @performanceLog ( )
187194 private async openAppInspector ( fileDescriptor : string , debugData : IDebugData , debugOptions : IDebugOptions ) : Promise < ChildProcess > {
188195 if ( debugOptions . client ) {
189196 const inspectorPath = await this . $packageInstallationManager . getInspectorFromCache ( inspectorNpmPackageName , debugData . projectDir ) ;
0 commit comments