How to debug in iphone

The app works in the browser but when I run

ionic cordova build ios

and from xcode install on the iphone -the app starts but hangs on the white startup screen - how can I find what what is causing this?