Skip to content

Commit 6bfce95

Browse files
authored
Merge pull request #1954 from NativeScript/raikov/debug-livesync-docs
Added documentation about debug + livesync
2 parents 5d1bdc5 + 4c82b42 commit 6bfce95

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

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

+7
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ Deploy in Genymotion, run the app and stop at the first code statement | `$ tns
1010
Attach the debug tools to a running app on device | `$ tns debug android --start [--device <Device ID>] [--debug-port <port>] [--timeout <timeout>]`
1111
Attach the debug tools to a running app in the native emulator | `$ tns debug android --start --emulator [<Emulator Options>] [--timeout <timeout>]`
1212
Attach the debug tools to a running app in Genymotion | `$ tns debug android --start --geny <Geny Name> [--print-app-output] [--timeout <timeout>]`
13+
Livesync on device, run the app start Chrome DevTools, and attach the debugger | `$ tns debug android --no-rebuild`
14+
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>]`
15+
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>]`
16+
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>]`
17+
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]`
1318
Retrieve the device port on which you are debugging | `$ tns debug android [--device <Device ID>] --get-port`
1419
Detach the debug tools | `$ tns debug android --stop`
1520

@@ -25,6 +30,8 @@ Debugs your project on a connected device, in a native emulator or in Genymotion
2530
* `--get-port` - Retrieves the port on which you are debugging your application.
2631
* `--debug-port` - Sets a new port on which to attach the debug tools.
2732
* `--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.
33+
* `--no-rebuild` - Livesyncs to device/emulator when possible. Otherwise builds and deploys the application.
34+
* `--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`.
2835

2936
### Attributes
3037
* `<Device ID>` is the index or name of the target device as listed by `$ tns device`

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

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ Deploy on device, run the app and stop at the first code statement | `$ tns debu
88
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]`
99
Attach the debug tools to a running app on device | `$ tns debug ios --start [--device <Device ID>] [--no-client]`
1010
Attach the debug tools to a running app in the iOS Simulator | `$ tns debug ios --start --emulator [<Emulator Options>] [--no-client]`
11+
Livesync on device, run the app, start Safari Web Inspector and attach the debugger | `$ tns debug ios --no-rebuild`
12+
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]`
13+
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]`
14+
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]`
1115

1216
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.<% } %>
1317

@@ -22,6 +26,8 @@ Debugs your project on a connected device or in the iOS Simulator. <% if(isHtml)
2226
* `--emulator` - Indicates that you want to debug your app in the iOS simulator.
2327
* `--no-client` - If set, the NativeScript CLI attaches the debug tools but does not launch the developer tools in Safari.
2428
* `--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.
29+
* `--no-rebuild` - Livesyncs to device/emulator when possible. Otherwise builds and deploys the application.
30+
* `--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`.
2531

2632
### Attributes
2733
* `<Device ID>` is the index or name of the target device as listed by `$ tns device`

docs/man_pages/project/testing/livesync.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ livesync
33

44
Usage | Synopsis
55
------|-------
6-
General | `$ tns livesync <Platform>`
6+
General | `$ tns livesync [<Platform>]`
77

88
Synchronizes the latest changes in your project to devices.
99

1010
### Attributes
1111
`<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.
1212
* `android` - Synchronizes the latest changes in your project to connected Android devices.
1313
* `ios` - Synchronizes the latest changes in your project to connected iOS devices.
14+
* All installed platforms and the corresponding devices/emulators will be synchronized when started without a platform.
1415

1516
<% if(isHtml) { %>
1617
### Command Limitations

0 commit comments

Comments
 (0)