How To Debug White Screen Ionic error on devices

Jose Mendez
2 min readJun 6, 2018

This type of error occurs when your Ionic app is working fine in your desktop browser (ionic serve) and then you deploy it to a device or emulator and it doesn’t work at all! What you see is a white screen when you open the app.
It is easy to debug your ionic app when doing `ionic serve` you just open the browser’s console, but once you deploy to a device or emulator, it is easy to know what is causing the error since the device doesn’t have a console to see JavaScript errors.

There are two ways to figure out what is happening one is using the cli livereload with consolelogs when using run or emulate command, and the second one is using the chrome developer tool.

Ionic livereload with consolelogs

Note: You can only use consolelogs if you also use livereload.

The livereload option will instantly reload/update the app on your device or emulator it is similar to when you run ionic serve for testing your app on the desktop browser, the consolelogs will log on the cmd console all the JavaScript error, etc. providing feedback of what is happening.

ionic run android --livereload --consolelogs

You can use the shorthand version:

ionic run android -l -c

--

--

Jose Mendez

I'm a Full-stack Entrepreneur. I love to share what I learn and what I know, and learn while I share. http://jomendez.com