title | description | position | slug | previous_url |
---|---|---|---|---|
Debugging |
How to debug {N} applications. |
20 |
debugging |
/debugging,/core-concepts/debugging |
You can debug apps developed with the NativeScript framework from both the NativeScript CLI and Visual Studio Code.
Note For more details about
Debugger Command
options, you can usetns debug android --help
ortns debug ios --help
.
To start the debugger for Android, run the following command:
tns debug android
To start the debugger for iOS, run the following command:
tns debug ios
This command starts the platform-specific debugger with the default --debug-brk
option.
You can customize the tns debug
command using any of the following options:
--debug-brk
- Prepares, builds and deploys the application package on a device or in an emulator, launches the browser and stops at the first breakpoint. This option is enabled by default when you runtns debug
and no other options are specified.--start
- Attaches the debug tools to a deployed and running app.--stop
- Detaches the debug tools.--emulator
- Specifies that you want to debug the app in an emulator.--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.
For more information about Android debugging, run the following command:
tns help debug android
For more information about iOS debugging, run the following command:
tns help debug ios
To debug NativeScript applications in Visual Studio Code, you need the NativeScript extension for VS Code. You can find detailed instructions about how to install and set up the NativeScript extension for VS Code [here]({% slug nativescript-extension-for-visual-studio-code %}).