Javascript errors in Ionic app deployed on ios

I am working on an Ionic app. When testing in the browser (on laptop), Chrome developer tools provide a great way to debug using console.log. It also shows Javascript errors in the browser console.

However, once the app is deployed on iPad (using xcode) the browser console is no longer visible. How can I see the statements printed using console.log and Javascript errors, if any.

Some actions in my Ionic app are not responding after the app is deployed on iPad. I think there might be some Javascript errors being thrown but I am not able to find what they are.

You will need to make sure you have the https://github.com/apache/cordova-plugin-console plugin installed. After that you should see the logs in xcode. The alternative is to use Safari. More details here: http://phonegap-tips.com/articles/debugging-ios-phonegap-apps-with-safaris-web-inspector.html