Reputation: 10028
Fellows I have made an app by using ionic framework.
When I run
ionic serve
On the terminal it runs as it should be. But when I run it via:
ionic run
I see on the device the app running by displaying the ionic's loading screen, but after that it does not run as it should be.
What I am asking is how can I see - debug any sort of error from the app running on the device in order to figure out what's wrong?
I am using an Adroid device for the tests.
Upvotes: 1
Views: 3255
Reputation: 10028
I fixed it by running:
adb logcat | grep 'Web Console'
On a linux terminal / git bash
Upvotes: 0
Reputation: 2291
You can add additional flags when using ionic run
.
So you can use something like
ionic run android -cls
Note that for livereload to work if the device is not connected directly make sure its in the same network as the serving device. Make sure to serve to a local IP address in this case (you can use ionic address
to change that).
Upvotes: 1
Reputation: 7724
After ionic run android
command keep fixed to your cable and laptop.
Go to your chrome and type chrome://inspect
you can see your app in that and click inspect so that you can able to look what is going on in your mobile app and you can debug it.
Upvotes: 2
Reputation: 129
Try this :
ionic run android -c -l
// -c for consolelogs and -l for livereload
Upvotes: 2