Skip to content

Fix tns debug ios --emulator #1254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 30, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/services/ios-debug-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,14 @@ class IOSDebugService implements IDebugService {
this.$platformService.buildPlatform(this.platform).wait();
let emulatorPackage = this.$platformService.getLatestApplicationPackageForEmulator(platformData).wait();

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

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

this.$childProcess.exec(`lldb -p ${pid} -o "process continue"`);
} else {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"gulp": "3.9.0",
"iconv-lite": "0.4.11",
"inquirer": "0.9.0",
"ios-sim-portable": "1.0.13",
"ios-sim-portable": "1.0.15",
"lockfile": "1.0.1",
"lodash": "3.10.0",
"log4js": "0.6.26",
Expand Down