Skip to content

Commit 4329c69

Browse files
fix: Unable to debug on iOS Simulator when multiple sims are running
In case multiple iOS Simulators are running and `tns debug ios` is called, CLI prompts you to select you on which device/simulator to debug. Selecting the device and trying to debug your application leads to error as CLI does not pass correctly the device identifier. Fix this by passing the correct device identifier. Also update ios-sim-portable to latest version, where several fixes for this case are applied
1 parent 65e41d1 commit 4329c69

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

lib/services/ios-debug-service.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,13 @@ export class IOSDebugService extends DebugServiceBase implements IPlatformDebugS
106106

107107
private async emulatorDebugBrk(debugData: IDebugData, debugOptions: IDebugOptions): Promise<string> {
108108
const args = debugOptions.debugBrk ? "--nativescript-debug-brk" : "--nativescript-debug-start";
109-
const launchResult = await this.$iOSEmulatorServices.runApplicationOnEmulator(debugData.pathToAppPackage, {
109+
const launchResult = await this.$iOSEmulatorServices.runApplicationOnEmulator(debugData.pathToAppPackage, {
110110
waitForDebugger: true,
111111
captureStdin: true,
112112
args: args,
113113
appId: debugData.applicationIdentifier,
114-
skipInstall: true
114+
skipInstall: true,
115+
device: debugData.deviceIdentifier
115116
});
116117

117118
const pid = getPidFromiOSSimulatorLogs(debugData.applicationIdentifier, launchResult);

npm-shrinkwrap.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"inquirer": "0.9.0",
4444
"ios-device-lib": "0.4.12",
4545
"ios-mobileprovision-finder": "1.0.10",
46-
"ios-sim-portable": "3.4.1",
46+
"ios-sim-portable": "3.4.3",
4747
"jimp": "0.2.28",
4848
"lockfile": "1.0.3",
4949
"lodash": "4.13.1",

0 commit comments

Comments
 (0)