Skip to content

Commit c81eef6

Browse files
committed
Add Wait for debugger option and pass it to the Simulator Session configuration.
Also output the process id of the application running on simulator. It would later be used in the nativescript-cli debugging
1 parent 50e4887 commit c81eef6

File tree

5 files changed

+34
-92
lines changed

5 files changed

+34
-92
lines changed

lib/iphone-simulator.js

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

lib/iphone-simulator.ts

+3
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ export class iPhoneSimulator implements IiPhoneSimulator {
132132
});
133133
sessionDelegate.addMethod("session:didStart:withError:", "v@:@c@", function(self: any, sel: string, session: any, started: boolean, error:any) {
134134
iPhoneSimulator.logSessionInfo(error, "Session started without errors.", "Session started with error ");
135+
136+
console.log(`${appPath}: ${session("simulatedApplicationPID")}`);
135137
if(options.exit) {
136138
process.exit(0);
137139
}
@@ -141,6 +143,7 @@ export class iPhoneSimulator implements IiPhoneSimulator {
141143
var appSpec = this.getClassByName("DTiPhoneSimulatorApplicationSpecifier")("specifierWithApplicationPath", $(appPath));
142144
var config = this.getClassByName("DTiPhoneSimulatorSessionConfig")("alloc")("init")("autorelease");
143145
config("setApplicationToSimulateOnStart", appSpec);
146+
config("setSimulatedApplicationShouldWaitForDebugger", options.waitForDebugger);
144147

145148
var sdkRoot = options.sdkRoot ? $(options.sdkRoot) : this.getClassByName("DTiPhoneSimulatorSystemRoot")("defaultRoot");
146149
config("setSimulatedSystemRoot", sdkRoot);

0 commit comments

Comments
 (0)