Skip to content

Commit 150ac02

Browse files
authored
Merge pull request #2244 from NativeScript/jasssonpet/ios-lldb-output
Print lldb output when attaching to the iOS Simulator with trace logging
2 parents d486431 + cbb446d commit 150ac02

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lib/common

lib/services/ios-debug-service.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as iOSDevice from "../common/mobile/ios/device/ios-device";
22
import * as net from "net";
33
import * as path from "path";
4+
import * as log4js from "log4js";
45
import {ChildProcess} from "child_process";
56
import byline = require("byline");
67

@@ -124,7 +125,11 @@ class IOSDebugService implements IDebugService {
124125
if (lineText && _.startsWith(lineText, this.$projectData.projectId)) {
125126
let pid = _.trimStart(lineText, this.$projectData.projectId + ": ");
126127
this._lldbProcess = this.$childProcess.spawn("lldb", [ "-p", pid]);
127-
this._lldbProcess.stdin.write("process continue\n");
128+
if (log4js.levels.TRACE.isGreaterThanOrEqualTo(this.$logger.getLevel())) {
129+
this._lldbProcess.stdout.pipe(process.stdout);
130+
}
131+
this._lldbProcess.stderr.pipe(process.stderr);
132+
this._lldbProcess.stdin.write("process continue\n");
128133
} else {
129134
process.stdout.write(line + "\n");
130135
}

0 commit comments

Comments
 (0)