Skip to content

Commit 3a16eaf

Browse files
Fatme HavaluovaFatme Havaluova
Fatme Havaluova
authored and
Fatme Havaluova
committed
Fix ios debug --start command
1 parent cc354e1 commit 3a16eaf

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/services/ios-debug-service.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -202,16 +202,21 @@ class IOSDebugService implements IDebugService {
202202
} catch (e) {
203203
this.$errors.failWithoutHelp(`The application ${projectId} timed out when performing the NativeScript debugger handshake.`);
204204
}
205+
this.readyForAttachAction(iosDevice).wait();
205206
break;
206207
case readyForAttach:
207-
createWebSocketProxy(this.$logger, (callback) => connectEventually(() => iosDevice.connectToPort(InspectorBackendPort), callback));
208-
this.executeOpenDebuggerClient().wait();
208+
this.readyForAttachAction(iosDevice).wait();
209209
break;
210210
}
211211
}).future<void>()()).wait();
212212
}).future<void>()();
213213
}
214214

215+
private readyForAttachAction(iosDevice: iOSDevice.IOSDevice): IFuture<void> {
216+
createWebSocketProxy(this.$logger, (callback) => connectEventually(() => iosDevice.connectToPort(InspectorBackendPort), callback));
217+
return this.executeOpenDebuggerClient();
218+
}
219+
215220
public executeOpenDebuggerClient(): IFuture<void> {
216221
if (this.$options.client) {
217222
return this.openDebuggingClient();

0 commit comments

Comments
 (0)