Skip to content

Remove --get-port flag #2440

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
Jan 18, 2017
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions docs/man_pages/project/testing/debug-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Livesync on device, run the app and stop at the first code statement | `$ tns de
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>]`
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>]`
Livesync on device/emulator, run the app, start and attach the debugger. Refresh everything automatically upon changes | `$ tns debug android --watch [--debug-brk]`
Retrieve the device port on which you are debugging | `$ tns debug android [--device <Device ID>] --get-port`
Detach the debug tools | `$ tns debug android --stop`

Debugs your project on a connected device, in a native emulator or in Genymotion.
Expand All @@ -27,7 +26,6 @@ Debugs your project on a connected device, in a native emulator or in Genymotion
* `--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.
* `--start` - Attaches the debug tools to a deployed and running app.
* `--stop` - Detaches the debug tools.
* `--get-port` - Retrieves the port on which you are debugging your application.
* `--debug-port` - Sets a new port on which to attach the debug tools.
* `--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.
* `--no-rebuild` - Livesyncs to device/emulator when possible. Otherwise builds and deploys the application.
Expand Down
2 changes: 1 addition & 1 deletion lib/common
Submodule common updated 2 files
+0 −1 declarations.d.ts
+0 −1 options.ts
8 changes: 4 additions & 4 deletions lib/services/android-debug-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class AndroidDebugService implements IDebugService {
return (() => {
let packageFile = "";

if (!this.$options.start && !this.$options.emulator && !this.$options.getPort) {
if (!this.$options.start && !this.$options.emulator) {
let cachedDeviceOption = this.$options.forDevice;
this.$options.forDevice = true;
this.$options.forDevice = !!cachedDeviceOption;
Expand All @@ -127,9 +127,9 @@ class AndroidDebugService implements IDebugService {
return (() => {
this.device = device;

if (this.$options.getPort) {
this.printDebugPort(device.deviceInfo.identifier, packageName).wait();
} else if (this.$options.start) {
this.printDebugPort(device.deviceInfo.identifier, packageName).wait();

if (this.$options.start) {
this.attachDebugger(device.deviceInfo.identifier, packageName).wait();
} else if (this.$options.stop) {
this.detachDebugger(packageName).wait();
Expand Down