From 53e685e1f3e9b1bbde865389fb7c8de7ebc52dce Mon Sep 17 00:00:00 2001 From: Panayot Cankov Date: Tue, 14 Apr 2015 14:40:57 +0300 Subject: [PATCH] Switch the debugging on emulator for iOS to use the iOSEmulatorService so that it can benefit from logging in the terminal. --- docs/man_pages/project/testing/debug-ios.md | 2 +- lib/services/ios-debug-service.ts | 4 +--- package.json | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/man_pages/project/testing/debug-ios.md b/docs/man_pages/project/testing/debug-ios.md index 57762147be..a6673abfac 100644 --- a/docs/man_pages/project/testing/debug-ios.md +++ b/docs/man_pages/project/testing/debug-ios.md @@ -22,7 +22,7 @@ Options: * `--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. * `--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. * `--emulator` - Debug on already running emulator. Requires `xcrun` from Xcode 6 or later. -* `--print-app-output` - If set, prints the standard output of the running application. (Device only) +* `--print-app-output` - If set, prints the standard output of the running application. * `--no-client` - Suppresses the launch of the developer tools in Safari. <% if(isHtml) { %> diff --git a/lib/services/ios-debug-service.ts b/lib/services/ios-debug-service.ts index 08e6382af7..ef1e411e14 100644 --- a/lib/services/ios-debug-service.ts +++ b/lib/services/ios-debug-service.ts @@ -66,13 +66,11 @@ class IOSDebugService implements IDebugService { private emulatorDebugBrk(): IFuture { return (() => { - var device = this.getRunningEmulatorOrRunNew().wait(); var platformData = this.$platformsData.getPlatformData(this.platform); this.$platformService.buildPlatform(this.platform).wait(); var emulatorPackage = this.$platformService.getLatestApplicationPackageForEmulator(platformData).wait(); - device.installApp(emulatorPackage.packageName).wait(); this.executeOpenDebuggerClient().wait(); - device.launchApp(this.$projectData.projectId, "--nativescript-debug-brk").wait(); + this.$iOSEmulatorServices.startEmulator(emulatorPackage.packageName, { args: "--nativescript-debug-brk" }).wait(); }).future()(); } diff --git a/package.json b/package.json index 5e8d36cc7c..e14ec06e99 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "gaze": "0.5.1", "iconv-lite": "0.4.4", "inquirer": "0.8.2", - "ios-sim-portable": "1.0.5", + "ios-sim-portable": "1.0.6", "lockfile": "1.0.0", "lodash": "3.6.0", "log4js": "0.6.22",