Skip to content

Do not build and install the app twice when debug command is executed #741

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
Aug 4, 2015
Merged
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
8 changes: 5 additions & 3 deletions lib/services/android-debug-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -132,8 +132,10 @@ class AndroidDebugService implements IDebugService {

private startAppWithDebugger(packageFile: string, packageName: string): IFuture<void> {
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;

Expand Down