Skip to content

Commit 75cce33

Browse files
committed
Fix --justlaunch
1 parent f8503f6 commit 75cce33

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/commands/debug.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,15 @@ export class DebugIOSCommand implements ICommand {
143143
private $injector: IInjector,
144144
private $projectData: IProjectData,
145145
private $platformsData: IPlatformsData,
146-
$iosDeviceOperations: IIOSDeviceOperations) {
146+
$iosDeviceOperations: IIOSDeviceOperations,
147+
$iOSSimulatorLogProvider: Mobile.IiOSSimulatorLogProvider) {
147148
this.$projectData.initializeProjectData();
148149
// Do not dispose ios-device-lib, so the process will remain alive and the debug application (NativeScript Inspector or Chrome DevTools) will be able to connect to the socket.
149150
// In case we dispose ios-device-lib, the socket will be closed and the code will fail when the debug application tries to read/send data to device socket.
150151
// That's why the `$ tns debug ios --justlaunch` command will not release the terminal.
151152
// In case we do not set it to false, the dispose will be called once the command finishes its execution, which will prevent the debugging.
152153
$iosDeviceOperations.setShouldDispose(false);
154+
$iOSSimulatorLogProvider.setShouldDispose(false);
153155
}
154156

155157
public execute(args: string[]): Promise<void> {

0 commit comments

Comments
 (0)