Skip to content

Commit cbf5242

Browse files
Fatme HavaluovaFatme Havaluova
Fatme Havaluova
authored and
Fatme Havaluova
committed
Fix tns debug ios --emulator
1 parent c4e6318 commit cbf5242

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/services/ios-debug-service.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,14 @@ class IOSDebugService implements IDebugService {
7676
this.$platformService.buildPlatform(this.platform).wait();
7777
let emulatorPackage = this.$platformService.getLatestApplicationPackageForEmulator(platformData).wait();
7878

79-
let child_process = this.$iOSEmulatorServices.startEmulator(emulatorPackage.packageName, { waitForDebugger: true, captureStdin: true, args: "--nativescript-debug-brk" }).wait();
79+
let child_process = this.$iOSEmulatorServices.startEmulator(emulatorPackage.packageName, { waitForDebugger: true, captureStdin: true,
80+
args: "--nativescript-debug-brk", appId: this.$projectData.projectId }).wait();
8081
let lineStream = byline(child_process.stdout);
8182

8283
lineStream.on('data', (line: NodeBuffer) => {
8384
let lineText = line.toString();
84-
if(lineText && _.startsWith(lineText, emulatorPackage.packageName)) {
85-
let pid = _.trimLeft(lineText, emulatorPackage.packageName + ": ");
85+
if(lineText && _.startsWith(lineText, this.$projectData.projectId)) {
86+
let pid = _.trimLeft(lineText, this.$projectData.projectId + ": ");
8687

8788
this.$childProcess.exec(`lldb -p ${pid} -o "process continue"`);
8889
} else {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"gulp": "3.9.0",
4343
"iconv-lite": "0.4.11",
4444
"inquirer": "0.9.0",
45-
"ios-sim-portable": "1.0.13",
45+
"ios-sim-portable": "1.0.14",
4646
"lockfile": "1.0.1",
4747
"lodash": "3.10.0",
4848
"log4js": "0.6.26",

0 commit comments

Comments
 (0)