Skip to content

Commit 9eb06f1

Browse files
committed
Remove --get-port flag
1 parent 47effaa commit 9eb06f1

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

docs/man_pages/project/testing/debug-android.md

-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Livesync on device, run the app and stop at the first code statement | `$ tns de
1515
Livesync in the native emulator, run the app and stop at the first code statement | `$ tns debug android --no-rebuild --debug-brk --emulator [<Emulator Options>] [--timeout <timeout>]`
1616
Livesync in Genymotion, run the app and stop at the first code statement | `$ tns debug android --no-rebuild --debug-brk --geny <Geny Name> [--timeout <timeout>]`
1717
Livesync on device/emulator, run the app, start and attach the debugger. Refresh everything automatically upon changes | `$ tns debug android --watch [--debug-brk]`
18-
Retrieve the device port on which you are debugging | `$ tns debug android [--device <Device ID>] --get-port`
1918
Detach the debug tools | `$ tns debug android --stop`
2019

2120
Debugs your project on a connected device, in a native emulator or in Genymotion.
@@ -27,7 +26,6 @@ Debugs your project on a connected device, in a native emulator or in Genymotion
2726
* `--debug-brk` - Prepares, builds and deploys the application package on a device or in an emulator, launches the Chrome DevTools of your Chrome browser and stops at the first code statement.
2827
* `--start` - Attaches the debug tools to a deployed and running app.
2928
* `--stop` - Detaches the debug tools.
30-
* `--get-port` - Retrieves the port on which you are debugging your application.
3129
* `--debug-port` - Sets a new port on which to attach the debug tools.
3230
* `--timeout` - Sets the number of seconds that the NativeScript CLI will wait for the debugger to boot. If not set, the default timeout is 90 seconds.
3331
* `--no-rebuild` - Livesyncs to device/emulator when possible. Otherwise builds and deploys the application.

lib/common

lib/services/android-debug-service.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class AndroidDebugService implements IDebugService {
106106
return (() => {
107107
let packageFile = "";
108108

109-
if (!this.$options.start && !this.$options.emulator && !this.$options.getPort) {
109+
if (!this.$options.start && !this.$options.emulator) {
110110
let cachedDeviceOption = this.$options.forDevice;
111111
this.$options.forDevice = true;
112112
this.$options.forDevice = !!cachedDeviceOption;
@@ -127,9 +127,9 @@ class AndroidDebugService implements IDebugService {
127127
return (() => {
128128
this.device = device;
129129

130-
if (this.$options.getPort) {
131-
this.printDebugPort(device.deviceInfo.identifier, packageName).wait();
132-
} else if (this.$options.start) {
130+
this.printDebugPort(device.deviceInfo.identifier, packageName).wait();
131+
132+
if (this.$options.start) {
133133
this.attachDebugger(device.deviceInfo.identifier, packageName).wait();
134134
} else if (this.$options.stop) {
135135
this.detachDebugger(packageName).wait();

0 commit comments

Comments
 (0)