Skip to content
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
2 changes: 1 addition & 1 deletion lib/common
16 changes: 15 additions & 1 deletion lib/services/ios-debug-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import * as path from "path";
import Future = require("fibers/future");
import semver = require("semver");
import temp = require("temp");
import byline = require("byline");

module notification {
function formatNotification(bundleId: string, notification: string) {
Expand Down Expand Up @@ -118,7 +119,20 @@ class IOSDebugService implements IDebugService {
this.$platformService.buildPlatform(this.platform).wait();
let emulatorPackage = this.$platformService.getLatestApplicationPackageForEmulator(platformData).wait();

this.$iOSEmulatorServices.startEmulator(emulatorPackage.packageName, { args: "--nativescript-debug-brk" }).wait();
let child_process = this.$iOSEmulatorServices.startEmulator(emulatorPackage.packageName, { waitForDebugger: true, captureStdin: true, args: "--nativescript-debug-brk" }).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 + ": ");

this.$childProcess.exec(`lldb -p ${pid} -o "process continue"`);
} else {
process.stdout.write(line + "\n");
}
});

this.wireDebuggerClient(() => net.connect(InspectorBackendPort)).wait();
}).future<void>()();
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"gulp": "3.9.0",
"iconv-lite": "0.4.11",
"inquirer": "0.9.0",
"ios-sim-portable": "1.0.9-beta",
"ios-sim-portable": "1.0.10-alpha",
"lockfile": "1.0.1",
"lodash": "3.10.0",
"log4js": "0.6.26",
Expand Down