How to debug in Safari

Can anyone help?

I have developed the app on Windows and checked it is running OK on an Android device. I have now ported it over to a Macbook and installed it on iPhone 5C - and this is where my problems really begin.

When one of the providers is called on a iPhone the app closes and now importantly the developer window in Safari closes as well - so there is no trace of what is causing the error.

How can I debug this before the window closes? I can see the list of sources (see image below) but I cannot see the code which I have written.

Is this provider using native code via a Cordova or Ionic Native plugin? It’s not very often that pure Ionic/Angular code makes an iOS app really crash.

It calls a Cordova audio plugin but I don’t how to find the provider in Safari developers window

How would that help?

I think you should look into understanding the native crash. I usually have HockeyApp implemented in my apps which gets the crash on the next app start, and can go from there. Maybe you can also do that locally only, don’t know.