From 87d8eae55e95b3c8fbfe374a1b7df69d57ecd9d1 Mon Sep 17 00:00:00 2001 From: Fatme Havaluova Date: Tue, 4 Aug 2015 10:12:05 +0300 Subject: [PATCH] Do not build and install the app twice when debug command is executed https://github.com/NativeScript/nativescript-cli/issues/722 --- lib/services/android-debug-service.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/services/android-debug-service.ts b/lib/services/android-debug-service.ts index 3002d07687..d3a87e9a69 100644 --- a/lib/services/android-debug-service.ts +++ b/lib/services/android-debug-service.ts @@ -60,7 +60,7 @@ class AndroidDebugService implements IDebugService { this.$options.debugBrk = true; } - if (this.$options.debugBrk) { + if (this.$options.debugBrk && !this.$options.emulator) { let cachedDeviceOption = this.$options.forDevice; this.$options.forDevice = true; this.$platformService.buildPlatform(this.platform).wait(); @@ -132,8 +132,10 @@ class AndroidDebugService implements IDebugService { private startAppWithDebugger(packageFile: string, packageName: string): IFuture { return (() => { - this.device.applicationManager.uninstallApplication(packageName).wait(); - this.device.applicationManager.installApplication(packageFile).wait(); + if(!this.$options.emulator) { + this.device.applicationManager.uninstallApplication(packageName).wait(); + this.device.applicationManager.installApplication(packageFile).wait(); + } let port = this.$options.debugPort;