Skip to content

Added: debug --watch should start livesync with watch option #1991

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
Aug 10, 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
2 changes: 1 addition & 1 deletion docs/man_pages/project/testing/debug-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Livesync on device, run the app start Chrome DevTools, and attach the debugger |
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]`
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`

Expand Down
2 changes: 1 addition & 1 deletion docs/man_pages/project/testing/debug-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Attach the debug tools to a running app in the iOS Simulator | `$ tns debug ios
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]`
Livesync on device/simulator, run the app, start and attach the debugger. Refresh everything automatically upon changes | `$ tns debug ios -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 Down
5 changes: 5 additions & 0 deletions lib/commands/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
protected $options: IOptions) { }

execute(args: string[]): IFuture<void> {

if (this.$options.watch) {
this.$options.rebuild = false;
}

if (!this.$options.rebuild && !this.$options.start) {
this.$config.debugLivesync = true;
let applicationReloadAction = (deviceAppData: Mobile.IDeviceAppData, localToDevicePaths: Mobile.ILocalToDevicePathData[]): IFuture<void> => {
Expand Down