Skip to content

Commit 33d3510

Browse files
committed
Merge pull request #423 from NativeScript/cankov/debug-and-log-emulator
Switch the debugging on emulator for iOS to use the iOSEmulatorService
2 parents f786c44 + 53e685e commit 33d3510

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

docs/man_pages/project/testing/debug-ios.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Options:
2222
* `--debug-brk` - Shorthand for prepare, build and deploy. Prepares, builds and deploys the application package on a device or in an emulator, launches the developer tools of your Safari browser.
2323
* `--start` - Attaches the debug tools to a deployed and running app. Your app must be running on device or emulator, launches the developer tools of your Safari browser.
2424
* `--emulator` - Debug on already running emulator. Requires `xcrun` from Xcode 6 or later.
25-
* `--print-app-output` - If set, prints the standard output of the running application. (Device only)
25+
* `--print-app-output` - If set, prints the standard output of the running application.
2626
* `--no-client` - Suppresses the launch of the developer tools in Safari.
2727
<% if(isHtml) { %>
2828

lib/services/ios-debug-service.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,11 @@ class IOSDebugService implements IDebugService {
6666

6767
private emulatorDebugBrk(): IFuture<void> {
6868
return (() => {
69-
var device = this.getRunningEmulatorOrRunNew().wait();
7069
var platformData = this.$platformsData.getPlatformData(this.platform);
7170
this.$platformService.buildPlatform(this.platform).wait();
7271
var emulatorPackage = this.$platformService.getLatestApplicationPackageForEmulator(platformData).wait();
73-
device.installApp(emulatorPackage.packageName).wait();
7472
this.executeOpenDebuggerClient().wait();
75-
device.launchApp(this.$projectData.projectId, "--nativescript-debug-brk").wait();
73+
this.$iOSEmulatorServices.startEmulator(emulatorPackage.packageName, { args: "--nativescript-debug-brk" }).wait();
7674
}).future<void>()();
7775
}
7876

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"gaze": "0.5.1",
3737
"iconv-lite": "0.4.4",
3838
"inquirer": "0.8.2",
39-
"ios-sim-portable": "1.0.5",
39+
"ios-sim-portable": "1.0.6",
4040
"lockfile": "1.0.0",
4141
"lodash": "3.6.0",
4242
"log4js": "0.6.22",

0 commit comments

Comments
 (0)