@@ -202,7 +202,7 @@ export class IOSDebugService extends DebugServiceBase implements IPlatformDebugS
202202 // the VSCode Ext starts `tns debug ios --no-client` to start/attach to debug sessions
203203 // check if --no-client is passed - default to opening a tcp socket (versus Chrome DevTools (websocket))
204204 if ( ( debugOptions . inspector || ! debugOptions . client ) && this . $hostInfo . isDarwin ) {
205- this . _socketProxy = await this . $socketProxyFactory . createTCPSocketProxy ( this . getSocketFactory ( debugData , device ) ) ;
205+ this . _socketProxy = await this . $socketProxyFactory . createTCPSocketProxy ( this . getSocketFactory ( device , debugData , debugOptions ) ) ;
206206 await this . openAppInspector ( this . _socketProxy . address ( ) , debugData , debugOptions ) ;
207207 return null ;
208208 } else {
@@ -211,7 +211,7 @@ export class IOSDebugService extends DebugServiceBase implements IPlatformDebugS
211211 }
212212
213213 const deviceIdentifier = device ? device . deviceInfo . identifier : debugData . deviceIdentifier ;
214- this . _socketProxy = await this . $socketProxyFactory . createWebSocketProxy ( this . getSocketFactory ( debugData , device ) , deviceIdentifier ) ;
214+ this . _socketProxy = await this . $socketProxyFactory . createWebSocketProxy ( this . getSocketFactory ( device , debugData , debugOptions ) , deviceIdentifier ) ;
215215 return this . getChromeDebugUrl ( debugOptions , this . _socketProxy . options . port ) ;
216216 }
217217 }
@@ -230,9 +230,9 @@ export class IOSDebugService extends DebugServiceBase implements IPlatformDebugS
230230 }
231231 }
232232
233- private getSocketFactory ( debugData : IDebugData , device ?: Mobile . IiOSDevice ) : ( ) => Promise < net . Socket > {
233+ private getSocketFactory ( device : Mobile . IiOSDevice , debugData : IDebugData , debugOptions : IDebugOptions ) : ( ) => Promise < net . Socket > {
234234 const factory = async ( ) => {
235- const port = await this . $iOSDebuggerPortService . getPort ( { projectDir : debugData . projectDir , deviceId : debugData . deviceIdentifier , appId : debugData . applicationIdentifier } ) ;
235+ const port = await this . $iOSDebuggerPortService . getPort ( { projectDir : debugData . projectDir , deviceId : debugData . deviceIdentifier , appId : debugData . applicationIdentifier } , debugOptions ) ;
236236 if ( ! port ) {
237237 this . $errors . fail ( "NativeScript debugger was not able to get inspector socket port." ) ;
238238 }
0 commit comments