diff --git a/docs/man_pages/project/testing/debug-android.md b/docs/man_pages/project/testing/debug-android.md index 0020bb9586..c1c2021fd3 100644 --- a/docs/man_pages/project/testing/debug-android.md +++ b/docs/man_pages/project/testing/debug-android.md @@ -3,54 +3,46 @@ debug android Usage | Synopsis ---|--- -Deploy on device, run the app start Chrome DevTools, and attach the debugger | `$ tns debug android` -Deploy on device, run the app and stop at the first code statement | `$ tns debug android --debug-brk [--device ] [--debug-port ] [--timeout ]` -Deploy in the native emulator, run the app and stop at the first code statement | `$ tns debug android --debug-brk --emulator [] [--timeout ]` -Attach the debug tools to a running app on device | `$ tns debug android --start [--device ] [--debug-port ] [--timeout ]` -Attach the debug tools to a running app in the native emulator | `$ tns debug android --start --emulator [] [--timeout ]` -Detach the debug tools | `$ tns debug android --stop` +Deploy on device/emulator, run the app, follow generated link to use in Chrome Developer Tools, and attach the debugger | `$ tns debug android` +Deploy on device/emulator, run the app and stop at the first code statement | `$ tns debug android --debug-brk [--device ] [--timeout ]` +Deploy in the native emulator, run the app and stop at the first code statement | `$ tns debug android --debug-brk --emulator [--timeout ]` +Attach the debug tools to a running app on device/emulator | `$ tns debug android --start [--device ] [--timeout ]` +Attach the debug tools to a running app in the native emulator | `$ tns debug android --start --emulator [--timeout ]` Prepares, builds and deploys the project when necessary. Debugs your project on a connected device or emulator. -While debugging, prints the output from the application in the console and watches for changes in your code. Once a change is detected, it synchronizes the change with all selected devices and restarts/refreshes the application. +While debugging, prints the output from the application in the console and watches for changes in your code. Once a change is detected, it synchronizes the change with the selected device and restarts the application. ### Options -* `--device` - Specifies a connected device on which to debug the app. -* `--emulator` - Specifies that you want to debug the app in the native Android emulator from the Android SDK. -* `--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. +* `--device` - Specifies a connected device/emulator on which to debug the app. +* `--emulator` - Specifies that you want to debug the app in the native Android emulator. +* `--debug-brk` - Prepares, builds and deploys the application package on a device/emulator, generates a link for Chrome Developer Tools and stops at the first code statement. * `--start` - Attaches the debug tools to a deployed and running app. -* `--stop` - Detaches the debug tools. -* `--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. +* `--timeout` - Sets the number of seconds that the NativeScript CLI will wait for the emulator/device to boot. If not set, the default timeout is 90 seconds. * `--no-watch` - If set, changes in your code will not be reflected during the execution of this command. * `--clean` - If set, forces rebuilding the native application. ### Attributes -* `` is the index or name of the target device as listed by `$ tns device` -* `` is an accessible port on the device to which you want to attach the debugging tools. -* `` is any valid combination of options as listed by `$ tns help emulate android` +* `` is the device identifier or name of the target device as listed by `$ tns device android` <% if(isHtml) { %> ### Prerequisites -* You must have Chrome installed on your system.
If you are using a non-standard named Chrome app on an OS X system (for example, a nightly Canary update), you need to set this name in the `ANDROID_DEBUG_UI_MAC` setting in the NativeScript [config.json](file:///<%= #{config.getConfigPath(config)} %>). +* You must have Chrome installed on your system.
+ ### Related Commands Command | Description ----------|---------- -[build android](build-android.html) | Builds the project for Android and produces an APK that you can manually deploy on device or in the native emulator. -[build ios](build-ios.html) | Builds the project for iOS and produces an APP or IPA that you can manually deploy in the iOS Simulator or on device, respectively. [build](build.html) | Builds the project for the selected target platform and produces an application package that you can manually deploy on device or in the native emulator. -[debug ios](debug-ios.html) | Debugs your project on a connected iOS device or in a native emulator. +[build android](build-android.html) | Builds the project for Android and produces an APK that you can manually deploy on device or in the native emulator. [debug](debug.html) | Debugs your project on a connected device or in a native emulator. +[debug ios](debug-ios.html) | Debugs your project on a connected iOS device or in a native emulator. [deploy](deploy.html) | Builds and deploys the project to a connected physical or virtual device. -[emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator. -[emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator. -[emulate](emulate.html) | You must run the emulate command with a related command. -[run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured. -[run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured. +[device](../../device/device.html) | Lists all connected devices/emulators. +[device android](../../device/device-android.html) | Lists all connected devices/emulators for android. [run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform. +[run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured. [test init](test-init.html) | Configures your project for unit testing with a selected framework. [test android](test-android.html) | Runs the tests in your project on Android devices or native emulators. -[test ios](test-ios.html) | Runs the tests in your project on iOS devices or the iOS Simulator. <% } %> \ No newline at end of file diff --git a/docs/man_pages/project/testing/debug-ios.md b/docs/man_pages/project/testing/debug-ios.md index 59766b276e..cd0fb05da2 100644 --- a/docs/man_pages/project/testing/debug-ios.md +++ b/docs/man_pages/project/testing/debug-ios.md @@ -3,14 +3,14 @@ debug ios Usage | Synopsis ---|--- -Deploy on device, run the app, start Safari Web Inspector and attach the debugger | `$ tns debug ios` -Deploy on device, run the app and stop at the first code statement | `$ tns debug ios --debug-brk [--device ] [--no-client]` -Deploy in the iOS Simulator, run the app and stop at the first code statement | `$ tns debug ios --debug-brk --emulator [] [--no-client]` -Attach the debug tools to a running app on device | `$ tns debug ios --start [--device ] [--no-client]` -Attach the debug tools to a running app in the iOS Simulator | `$ tns debug ios --start --emulator [] [--no-client]` +Deploy on device/simulator, run the app, start Safari Web Inspector and attache the debugger | `$ tns debug ios` +Deploy on device/simulator, run the app and stop at the first code statement | `$ tns debug ios --debug-brk [--device ] [--no-client]` +Deploy in the iOS simulator, run the app and stop at the first code statement | `$ tns debug ios --debug-brk --emulator [--no-client]` +Attach the debug tools to a running app on specified device or simulator| `$ tns debug ios --start [--device ] [--no-client]` +Attach the debug tools to a running app in the iOS simulator | `$ tns debug ios --start --emulator [--no-client]` -Prepares, builds and deploys the project when necessary. 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.<% } %> -While debugging, prints the output from the application in the console and watches for changes in your code. Once a change is detected, it synchronizes the change with all selected devices and restarts/refreshes the application. +Prepares, builds and deploys the project when necessary. Debugs your project on a connected device or in the iOS simulator. <% if(isHtml) { %>Any debugging traffic is forwarded to port 8080( or the next available one) from the device to the local machine.<% } %> +While debugging, prints the output from the application in the console and watches for changes in your code. Once a change is detected, it synchronizes the change with the selected device and restarts the application. <% if(isConsole && (isWindows || isLinux)) { %>WARNING: You can run this command only on OS X systems. To view the complete help for this command, run `$ tns help debug ios`<% } %> @@ -18,23 +18,23 @@ While debugging, prints the output from the application in the console and watch <% if(isHtml) { %>> <% } %>IMPORTANT: Before building for iOS device, verify that you have configured a valid pair of certificate and provisioning profile on your OS X system. <% if(isHtml) { %>For more information, see [Obtaining Signing Identities and Downloading Provisioning Profiles](https://developer.apple.com/library/mac/recipes/xcode_help-accounts_preferences/articles/obtain_certificates_and_provisioning_profiles.html).<% } %> ### Options -* `--device` - Specifies a connected device on which to run the app. +* `--device` - Specifies a connected device or iOS simulator on which to run the app. * `--emulator` - Indicates that you want to debug your app in the iOS simulator. -* `--debug-brk` - Prepares, builds and deploys the application package on a device or in an emulator, runs the app, launches the developer tools of your Safari browser and stops at the first code statement. +* `--debug-brk` - Prepares, builds and deploys the application package on a device or in a simulator, runs the app, launches the developer tools of your Safari browser and stops at the first code statement. * `--start` - Attaches the debug tools to a deployed and running app and launches the developer tools of your Safari browser. -* `--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-client` - If set, the NativeScript CLI attaches the debug tools but does not launch the developer tools in Safari. Could be used on already started Safari Web Inspector. +* `--timeout` - Sets the number of seconds that NativeScript CLI will wait for the simulator/device to boot. If not set, the default timeout is 90 seconds. * `--no-watch` - If set, changes in your code will not be reflected during the execution of this command. * `--clean` - If set, forces rebuilding the native application. +* `--chrome` - Allows debugging in Chrome Developer Tools. If set Safari Web Inspector is not started and debugging is attached to Chrome Developer Tools. ### Attributes -* `` is the index or name of the target device as listed by `$ tns device` -* `` is any valid combination of options as listed by `$ tns help emulate ios` +* `` is the device identifier of the target device as listed by `$ tns device ios` <% } %> <% if(isHtml) { %> ### Prerequisite -* If you want to debug in the iOS Simulator, you must have Xcode 6 or later installed on your system. +* If you want to debug in the iOS simulator, you must have Xcode 6 or later installed on your system. ### Command Limitations @@ -44,19 +44,15 @@ While debugging, prints the output from the application in the console and watch Command | Description ----------|---------- -[build android](build-android.html) | Builds the project for Android and produces an APK that you can manually deploy on device or in the native emulator. -[build ios](build-ios.html) | Builds the project for iOS and produces an APP or IPA that you can manually deploy in the iOS Simulator or on device, respectively. [build](build.html) | Builds the project for the selected target platform and produces an application package that you can manually deploy on device or in the native emulator. -[debug android](debug-android.html) | Debugs your project on a connected Android device or in a native emulator. +[build ios](build-ios.html) | Builds the project for iOS and produces an APP or IPA that you can manually deploy in the iOS simulator or on device, respectively. [debug](debug.html) | Debugs your project on a connected device or in a native emulator. +[debug android](debug-android.html) | Debugs your project on a connected Android device or in a native emulator. [deploy](deploy.html) | Builds and deploys the project to a connected physical or virtual device. -[emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator. -[emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator. -[emulate](emulate.html) | You must run the emulate command with a related command. -[run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured. -[run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured. +[device](../../device/device.html) | Lists all connected devices/emulators. +[device ios](../../device/device-ios.html) | Lists all connected devices/simulators for iOS. [run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform. +[run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS simulator, if configured. [test init](test-init.html) | Configures your project for unit testing with a selected framework. -[test android](test-android.html) | Runs the tests in your project on Android devices or native emulators. -[test ios](test-ios.html) | Runs the tests in your project on iOS devices or the iOS Simulator. +[test ios](test-ios.html) | Runs the tests in your project on iOS devices or the iOS simulator. <% } %> \ No newline at end of file diff --git a/docs/man_pages/project/testing/debug.md b/docs/man_pages/project/testing/debug.md index f0d8d6bde0..f9a7123d0f 100644 --- a/docs/man_pages/project/testing/debug.md +++ b/docs/man_pages/project/testing/debug.md @@ -5,12 +5,12 @@ Usage | Synopsis ---|--- <% if((isConsole && isMacOS) || isHtml) { %>General | `$ tns debug `<% } %><% if(isConsole && (isLinux || isWindows)) { %>General | `$ tns debug android`<% } %> -Debugs your project on a connected device or in a native emulator. <% if(isMacOS) { %>You must specify the target platform on which you want to debug.<% } %> The command will prepare, build and deploy the app when necessary. By default listens for changes in your code, synchronizes those changes and refreshes the selected device. +Debugs your project on a connected device or in a native emulator. <% if(isMacOS) { %>You must specify the target platform on which you want to debug.<% } %> The command will prepare, build and deploy the app when necessary. By default listens for changes in your code, synchronizes those changes and restarts the app on the targeted device. <% if((isConsole && isMacOS) || isHtml) { %>### Attributes -`` is the target mobile platform for which you want to debug your project. You can set the following target platforms. +`` is the target mobile platform for which you want to debug your project. You can set the following target platforms: * `android` - Debugs your project on a connected Android device or Android emulator. -* `ios` - Debugs your project on a connected iOS device or in a native iOS emulator.<% } %> +* `ios` - Debugs your project on a connected iOS device or in a native iOS simulator.<% } %> <% if(isHtml) { %> ### Command Limitations @@ -27,9 +27,6 @@ Command | Description [debug android](debug-android.html) | Debugs your project on a connected Android device or in a native emulator. [debug ios](debug-ios.html) | Debugs your project on a connected iOS device or in a native emulator. [deploy](deploy.html) | Builds and deploys the project to a connected physical or virtual device. -[emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator. -[emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator. -[emulate](emulate.html) | You must run the emulate command with a related command. [run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured. [run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured. [run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform.