Skip to content

Commit cc835bd

Browse files
authored
fix debug ios inspector option (#3242)
1 parent 16c912e commit cc835bd

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/options.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export class Options extends commonOptionsLibPath.OptionsBase {
3636
syncAllFiles: { type: OptionType.Boolean, default: false },
3737
liveEdit: { type: OptionType.Boolean },
3838
chrome: { type: OptionType.Boolean },
39+
inspector: { type: OptionType.Boolean },
3940
clean: { type: OptionType.Boolean },
4041
watch: { type: OptionType.Boolean, default: true }
4142
},

lib/services/ios-debug-service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,9 @@ export class IOSDebugService extends DebugServiceBase implements IPlatformDebugS
201201
}
202202

203203
private async wireDebuggerClient(debugData: IDebugData, debugOptions: IDebugOptions, device?: Mobile.IiOSDevice): Promise<string> {
204-
if (debugOptions.inspector && this.$hostInfo.isDarwin) {
204+
// the VSCode Ext starts `tns debug ios --no-client` to start/attach to debug sessions
205+
// check if --no-client is passed - default to opening a tcp socket (versus Chrome DevTools (websocket))
206+
if ((debugOptions.inspector || !debugOptions.client) && this.$hostInfo.isDarwin) {
205207
this._socketProxy = await this.$socketProxyFactory.createTCPSocketProxy(this.getSocketFactory(device));
206208
await this.openAppInspector(this._socketProxy.address(), debugData, debugOptions);
207209
return null;

0 commit comments

Comments
 (0)