Initiates a debugging session for your project on a connected Android device or Android emulator. When necessary, the command will prepare, build, deploy and launch the app before starting the debug session. While debugging, the output from the application is printed in the console and any changes made to your code are synchronizes with the deployed app.
To enable Hot Module Replacement (HMR) in Angular projects, follow the steps outlined in this wiki: https://github.com/NativeScript/nativescript-angular/wiki/HMR.
|Deploy on device/emulator, run the app and generate a Chrome DevTools link for debugging||
|Deploy on device/emulator, run the app and stop at the first code statement||
|Deploy in the native emulator, run the app and stop at the first code statement||
|Attach the debug tools to a running app on device/emulator||
|Attach the debug tools to a running app in the native emulator||
--device- Specifies a connected device/emulator on which to debug the app.
<Device ID>is the device identifier or name of the target device as listed by the
$ tns device androidcommand.
--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.
--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 the complete rebuild of the native application.
--bundle- Specifies that the
webpackbundler will be used to bundle the application.
--hmr- (Beta) Enables the hot module replacement (HMR) feature. HMR depends on
webpackand adding the
--hmrflag to the command will automatically enable the
--bundleoption as well. The HMR feature is currently in Beta. For more information about the current development state and any known issues, please check the relevant GitHub issue: https://github.com/NativeScript/NativeScript/issues/6398.
--syncAllFiles- Watches all production dependencies inside node_modules for changes. Triggers project rebuild if necessary!
Note: Hot Module Replacement (HMR) is currently in Beta. For more information about the current development state and any known issues, please check the relevant GitHub issue: https://github.com/NativeScript/NativeScript/issues/6398.
- You must have Google Chrome installed on your machine.
|build||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.|
|build android||Builds the project for Android and produces an APK that you can manually deploy on device or in the native emulator.|
|debug||Debugs your project on a connected device or in a native emulator.|
|debug ios||Debugs your project on a connected iOS device or in a native emulator.|
|deploy||Builds and deploys the project to a connected physical or virtual device.|
|device||Lists all connected devices/emulators.|
|device android||Lists all connected devices/emulators for android.|
|run||Runs your project on a connected device or in the native emulator for the selected platform.|
|run android||Runs your project on a connected Android device or in a native Android emulator, if configured.|
|test init||Configures your project for unit testing with a selected framework.|
|test android||Runs the tests in your project on Android devices or native emulators.|