Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Debug Ionic WebApp?

I want to debug my ionic application in WebStorm. I am able to run the app in browser. But how can I debug?

I tried: ionic serve --debug which doesn't seem to trigger any debugging?

How can I debug the app when it runs in browser?

like image 241
electronix384128 Avatar asked Feb 23 '15 16:02

electronix384128


2 Answers

With Chrome you can type chrome://inspect into your address bar As soon as you are running your Android app, you can inspect the app when you are running it with the "ionic run android" or "ionic emulate android" command

The version of Android, however, must be higher than 4.3 I think...

like image 58
Johan Degrieck Avatar answered Oct 30 '22 20:10

Johan Degrieck


According to the documentation there's a few different way's to do this. Also could you try one of these listed below since you have tried ionic serve already?

 ionic run
 ionic emulate

The run or emulate command will deploy the app to the specified platform devices/emulators. You can also run live reload on the specified platform device by adding the --livereload option. The live reload functionality is similar to ionic serve, but instead of developing and debugging an app using a standard browser, the compiled hybrid app itself is watching for any changes to its files and reloading the app when needed. This reduces the requirement to constantly rebuild the app for small changes.

Hope this get's you going! Let me know how it work's out for you.

like image 35
Trevor Avatar answered Oct 30 '22 19:10

Trevor