Skip to content

Commit 87d8eae

Browse files
Fatme HavaluovaFatme Havaluova
Fatme Havaluova
authored and
Fatme Havaluova
committed
Do not build and install the app twice when debug command is executed
#722
1 parent cadb132 commit 87d8eae

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/services/android-debug-service.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class AndroidDebugService implements IDebugService {
6060
this.$options.debugBrk = true;
6161
}
6262

63-
if (this.$options.debugBrk) {
63+
if (this.$options.debugBrk && !this.$options.emulator) {
6464
let cachedDeviceOption = this.$options.forDevice;
6565
this.$options.forDevice = true;
6666
this.$platformService.buildPlatform(this.platform).wait();
@@ -132,8 +132,10 @@ class AndroidDebugService implements IDebugService {
132132

133133
private startAppWithDebugger(packageFile: string, packageName: string): IFuture<void> {
134134
return (() => {
135-
this.device.applicationManager.uninstallApplication(packageName).wait();
136-
this.device.applicationManager.installApplication(packageFile).wait();
135+
if(!this.$options.emulator) {
136+
this.device.applicationManager.uninstallApplication(packageName).wait();
137+
this.device.applicationManager.installApplication(packageFile).wait();
138+
}
137139

138140
let port = this.$options.debugPort;
139141

0 commit comments

Comments
 (0)