Debug Ionic app on IOS?

My HTML5 app is packaged by Ionic (using Cordova) and loads onto my iPhone like a normal app.

Can I debug whilst connected to the device? I know with Android you have logcat and in the browser I have dev tools but there are differences between the app on device and the browser and I want to know why.

Any help appreciated.



There are three primary options.

  1. Debug using Safari. This is good for debugging a hybrid app, but cannot tell you output related to native plugins.
  2. Open the project and build to device in Xcode. This shows the output of the entire device
  3. Debug with Ionic CLI. Using ionic run ios -l -c -s with the flags will use live reload and print the logs to the console.

Similar to the first answer, here's how I debug on iOS.

ionic emulate ios -lc

Which runs app using simulator and outputs console logs and errors to terminal with live reloading.

i'm using ionic 2 and typescript. you can use debugger keyword to debug on ios like this:

then open safari -> developer -> simulate -> index.html, good luck

You can use Visual Studio Code with the following extension:

Regards, Nicholls

I'd also add that in Ionic 1.2, you can get console/error output right in Terminal via ionic serve or ionic emulate.

Need Your Help

How do I convert HTML to RTF (Rich Text) in .NET without paying for a component?

.net html rtf richtext

Is there a free third-party or .NET class that will convert HTML to RTF (for use in a rich-text enabled Windows Forms control)?