Skip to content

Commit 72ab337

Browse files
committed
refactor: remove the emulator debug option
1 parent 31d7d4a commit 72ab337

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

lib/definitions/debug.d.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ interface IDebugOptions {
4343
*/
4444
stop?: boolean;
4545

46-
// TODO: remove
47-
/**
48-
* Defines if debug process is for emulator (not for real device).
49-
*/
50-
emulator?: boolean;
51-
5246
/**
5347
* Defines if the debug process should break on the first line.
5448
*/

lib/services/android-debug-service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class AndroidDebugService extends DebugServiceBase implements IPlatformDe
2626

2727
public async debug(debugData: IDebugData, debugOptions: IDebugOptions): Promise<string> {
2828
this._packageName = debugData.applicationIdentifier;
29-
const result = debugOptions.emulator
29+
const result = this.device.isEmulator
3030
? await this.debugOnEmulator(debugData, debugOptions)
3131
: await this.debugOnDevice(debugData, debugOptions);
3232

@@ -108,7 +108,7 @@ export class AndroidDebugService extends DebugServiceBase implements IPlatformDe
108108
private async debugOnDevice(debugData: IDebugData, debugOptions: IDebugOptions): Promise<string> {
109109
let packageFile = "";
110110

111-
if (!debugOptions.start && !debugOptions.emulator) {
111+
if (!debugOptions.start && !this.device.isEmulator) {
112112
packageFile = debugData.pathToAppPackage;
113113
this.$logger.out("Using ", packageFile);
114114
}

lib/services/debug-service.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ export class DebugService extends EventEmitter implements IDebugService {
5757
this.$errors.failWithoutHelp("To debug on iOS simulator you need to provide path to the app package.");
5858
}
5959

60-
if (this.$hostInfo.isWindows) {
61-
debugOptions.emulator = false;
62-
} else if (!this.$hostInfo.isDarwin) {
60+
if (!this.$hostInfo.isWindows && !this.$hostInfo.isDarwin) {
6361
this.$errors.failWithoutHelp(`Debugging on iOS devices is not supported for ${platform()} yet.`);
6462
}
6563
}

0 commit comments

Comments
 (0)