Skip to content

Added documentation about debug + livesync #1954

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
Jul 27, 2016
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
7 changes: 7 additions & 0 deletions docs/man_pages/project/testing/debug-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ Deploy in Genymotion, run the app and stop at the first code statement | `$ tns
Attach the debug tools to a running app on device | `$ tns debug android --start [--device <Device ID>] [--debug-port <port>] [--timeout <timeout>]`
Attach the debug tools to a running app in the native emulator | `$ tns debug android --start --emulator [<Emulator Options>] [--timeout <timeout>]`
Attach the debug tools to a running app in Genymotion | `$ tns debug android --start --geny <Geny Name> [--print-app-output] [--timeout <timeout>]`
Livesync on device, run the app start Chrome DevTools, and attach the debugger | `$ tns debug android --no-rebuild`
Livesync on device, run the app and stop at the first code statement | `$ tns debug android --no-rebuild --debug-brk [--device <Device ID>] [--debug-port <port>] [--timeout <timeout>]`
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 --no-rebuild --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`

Expand All @@ -25,6 +30,8 @@ Debugs your project on a connected device, in a native emulator or in Genymotion
* `--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.
* `--watch` - If set, when you save changes to the project, changes are automatically synchronized to the connected device and the debugger is restarted. This option is available only when using `--no-rebuild`.

### Attributes
* `<Device ID>` is the index or name of the target device as listed by `$ tns device`
Expand Down
6 changes: 6 additions & 0 deletions docs/man_pages/project/testing/debug-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Deploy on device, run the app and stop at the first code statement | `$ tns debu
Deploy in the iOS Simulator, run the app and stop at the first code statement | `$ tns debug ios --debug-brk --emulator [<Emulator Options>] [--no-client]`
Attach the debug tools to a running app on device | `$ tns debug ios --start [--device <Device ID>] [--no-client]`
Attach the debug tools to a running app in the iOS Simulator | `$ tns debug ios --start --emulator [<Emulator Options>] [--no-client]`
Livesync on device, run the app, start Safari Web Inspector and attach the debugger | `$ tns debug ios --no-rebuild`
Livesync on device, run the app and stop at the first code statement | `$ tns debug ios --no-rebuild --debug-brk [--device <Device ID>] [--no-client]`
Livesync in the iOS Simulator, run the app and stop at the first code statement | `$ tns debug ios --no-rebuild --debug-brk --emulator [<Emulator Options>] [--no-client]`
Livesync on device/simulator, run the app, start and attach the debugger. Refresh everything automatically upon changes | `$ tns debug ios --no-rebuild --watch [--debug-brk]`

Debugs your project on a connected device or in the iOS Simulator. <% if(isHtml) { %>Any debugging traffic is forwarded on port 8080 from the device to the local machine.<% } %>

Expand All @@ -22,6 +26,8 @@ Debugs your project on a connected device or in the iOS Simulator. <% if(isHtml)
* `--emulator` - Indicates that you want to debug your app in the iOS simulator.
* `--no-client` - If set, the NativeScript CLI attaches the debug tools but does not launch the developer tools in Safari.
* `--timeout` - Sets the number of seconds that 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.
* `--watch` - If set, when you save changes to the project, changes are automatically synchronized to the connected device and the debugger is restarted. This option is available only when using `--no-rebuild`.

### Attributes
* `<Device ID>` is the index or name of the target device as listed by `$ tns device`
Expand Down
3 changes: 2 additions & 1 deletion docs/man_pages/project/testing/livesync.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ livesync

Usage | Synopsis
------|-------
General | `$ tns livesync <Platform>`
General | `$ tns livesync [<Platform>]`

Synchronizes the latest changes in your project to devices.

### Attributes
`<Platform>` is the target mobile platform to which you want to synchronize your changes. <% if(isHtml) { %>If you have connected only Android or only iOS devices, you can omit setting the target platform. If you have connected devices of multiple platforms, you must specify the target platform. <% } %>You can set the following target platforms.
* `android` - Synchronizes the latest changes in your project to connected Android devices.
* `ios` - Synchronizes the latest changes in your project to connected iOS devices.
* All installed platforms and the corresponding devices/emulators will be synchronized when started without a platform.

<% if(isHtml) { %>
### Command Limitations
Expand Down