diff --git a/docs/man_pages/project/testing/debug-android.md b/docs/man_pages/project/testing/debug-android.md index 0e9a6e0607..5ee960f34e 100644 --- a/docs/man_pages/project/testing/debug-android.md +++ b/docs/man_pages/project/testing/debug-android.md @@ -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 ] [--debug-port ] [--timeout ]` Livesync in the native emulator, run the app and stop at the first code statement | `$ tns debug android --no-rebuild --debug-brk --emulator [] [--timeout ]` Livesync in Genymotion, run the app and stop at the first code statement | `$ tns debug android --no-rebuild --debug-brk --geny [--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 ] --get-port` Detach the debug tools | `$ tns debug android --stop` diff --git a/docs/man_pages/project/testing/debug-ios.md b/docs/man_pages/project/testing/debug-ios.md index 47dd020d19..0dbeaff3ae 100644 --- a/docs/man_pages/project/testing/debug-ios.md +++ b/docs/man_pages/project/testing/debug-ios.md @@ -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 ] [--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 [] [--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.<% } %> diff --git a/lib/commands/debug.ts b/lib/commands/debug.ts index 13e1c960cf..f38ee4548f 100644 --- a/lib/commands/debug.ts +++ b/lib/commands/debug.ts @@ -10,6 +10,11 @@ protected $options: IOptions) { } execute(args: string[]): IFuture { + + 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 => {