Skip to content

Switch the debugging on emulator for iOS to use the iOSEmulatorService #423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2015
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 docs/man_pages/project/testing/debug-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) { %>

Expand Down
4 changes: 1 addition & 3 deletions lib/services/ios-debug-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,11 @@ class IOSDebugService implements IDebugService {

private emulatorDebugBrk(): IFuture<void> {
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<void>()();
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down