Skip to content

Latest commit

 

History

History
63 lines (41 loc) · 1.91 KB

running.md

File metadata and controls

63 lines (41 loc) · 1.91 KB

Running and debugging

Running

Android

You can run the app in:

  • A virtual device created through the AVD manager
  • A real Android device connected through USB, with developer mode and USB debugging enabled

The command ns devices android --available-devices will list the available devices. You can select a specific devce with ns run android --device=<Image Identifier>.

iOS

You can run the app in:

  • A simulator installed through Xcode > Preferences > Components;
  • A real iOS device connected through USB. You will need an iOS developer account.

The command ns devices ios --available-devices will list the available devices. You can select a specific devce with ns run ios --device=<Image Identifier>.

Debugging

To run the app in debug mode, use the command:

ns debug android|ios

Chrome devtools

The debug command will output extra logging and a link that you can open in Chrome (or Chrome-based) browser to debug JavaScript (with breakpoints, step debugging, inspecting variables, etc.), use the JavaScript console, inspect the NativeScript component tree, and see network requests.

Vue devtools

You can also use Vue devtools standalone client. To activate it:

  1. Install the Vue devtools standalone client and open it.
npm install -g @vue/devtools

vue-devtools
  1. Change the host in main.js to your computer's IP address:
Vue.use(VueDevtools, { host: '192.168.1.211' });
  1. Run the app in debug mode
ns debug android|ios

With Vue devtools you can see the Vue component tree, events and component renderings.