@@ -33,8 +33,11 @@ export class IOSDeviceDebugService extends DebugServiceBase implements IDeviceDe
33
33
@performanceLog ( )
34
34
public async debug ( debugData : IDebugData , debugOptions : IDebugOptions ) : Promise < IDebugResultInfo > {
35
35
await this . validateOptions ( debugOptions ) ;
36
+ const result : IDebugResultInfo = { debugUrl : null } ;
36
37
37
- return await this . wireDebuggerClient ( debugData , debugOptions ) ;
38
+ result . debugUrl = await this . wireDebuggerClient ( debugData , debugOptions ) ;
39
+
40
+ return result ;
38
41
}
39
42
40
43
public async debugStop ( ) : Promise < void > {
@@ -81,28 +84,25 @@ export class IOSDeviceDebugService extends DebugServiceBase implements IDeviceDe
81
84
}
82
85
83
86
@performanceLog ( )
84
- private async wireDebuggerClient ( debugData : IDebugData , debugOptions : IDebugOptions ) : Promise < IDebugResultInfo > {
87
+ private async wireDebuggerClient ( debugData : IDebugData , debugOptions : IDebugOptions ) : Promise < string > {
85
88
if ( ( debugOptions . inspector || ! debugOptions . client ) && this . $hostInfo . isDarwin ) {
86
89
return await this . setupTcpAppDebugProxy ( debugData , debugOptions ) ;
87
90
} else {
88
91
return await this . setupWebAppDebugProxy ( debugOptions , debugData ) ;
89
92
}
90
93
}
91
94
92
- private async setupWebAppDebugProxy ( debugOptions : IDebugOptions , debugData : IDebugData ) : Promise < IDebugResultInfo > {
95
+ private async setupWebAppDebugProxy ( debugOptions : IDebugOptions , debugData : IDebugData ) : Promise < string > {
93
96
if ( debugOptions . chrome ) {
94
97
this . $logger . info ( "'--chrome' is the default behavior. Use --inspector to debug iOS applications using the Safari Web Inspector." ) ;
95
98
}
96
99
const projectName = this . getProjectName ( debugData ) ;
97
100
const webSocketProxy = await this . $appDebugSocketProxyFactory . ensureWebSocketProxy ( this . device , debugData . applicationIdentifier , projectName , debugData . projectDir ) ;
98
101
99
- return {
100
- debugUrl : this . getChromeDebugUrl ( debugOptions , webSocketProxy . options . port ) ,
101
- legacyDebugUrl : this . getChromeDebugUrl ( debugOptions , webSocketProxy . options . port , true )
102
- } ;
102
+ return this . getChromeDebugUrl ( debugOptions , webSocketProxy . options . port ) ;
103
103
}
104
104
105
- private async setupTcpAppDebugProxy ( debugData : IDebugData , debugOptions : IDebugOptions ) : Promise < IDebugResultInfo > {
105
+ private async setupTcpAppDebugProxy ( debugData : IDebugData , debugOptions : IDebugOptions ) : Promise < string > {
106
106
const projectName = this . getProjectName ( debugData ) ;
107
107
const existingTcpProxy = this . $appDebugSocketProxyFactory . getTCPSocketProxy ( this . deviceIdentifier , debugData . applicationIdentifier ) ;
108
108
const tcpSocketProxy = existingTcpProxy || await this . $appDebugSocketProxyFactory . addTCPSocketProxy ( this . device , debugData . applicationIdentifier , projectName , debugData . projectDir ) ;
0 commit comments