Skip to content

Commit 8a6abaf

Browse files
committed
Attach to debugger port found event when debug command is executed on real iOS device
1 parent e771c1a commit 8a6abaf

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/device-sockets/ios/socket-proxy-factory.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export class SocketProxyFactory extends EventEmitter implements ISocketProxyFact
9595
err.deviceIdentifier = deviceIdentifier;
9696
this.$logger.trace(err);
9797
this.emit(CONNECTION_ERROR_EVENT_NAME, err);
98-
this.$errors.failWithoutHelp("Cannot connect to device socket.");
98+
this.$errors.failWithoutHelp(`Cannot connect to device socket. The error message is ${err.message}`);
9999
}
100100

101101
this.$logger.info("Backend socket created.");

lib/services/livesync/ios-livesync-service.ts

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export class IOSLiveSyncService extends PlatformLiveSyncServiceBase implements I
1313
$devicePathProvider: IDevicePathProvider,
1414
$logger: ILogger,
1515
$projectFilesProvider: IProjectFilesProvider,
16+
private $iOSDebuggerPortService: IIOSDebuggerPortService,
1617
) {
1718
super($fs, $logger, $platformsData, $projectFilesManager, $devicePathProvider, $projectFilesProvider);
1819
}
@@ -22,6 +23,8 @@ export class IOSLiveSyncService extends PlatformLiveSyncServiceBase implements I
2223

2324
if (device.isEmulator) {
2425
return super.fullSync(syncInfo);
26+
} else {
27+
this.$iOSDebuggerPortService.attachToDebuggerPortFoundEvent(device);
2528
}
2629

2730
const projectData = syncInfo.projectData;

0 commit comments

Comments
 (0)