Web Inspector


#1

Is there an option to see console.logs and/or to use the web inspector on an ionic app?

My app works great on Simulator Safari, but not as an app. Could be anything, so I just want to see the log.


#2

Yes, console.log but you need to add the cordova console plugin to your project

$ cordova plugin add org.apache.cordova.console

This will print out all your console.log to Xcode’s console as well as Safari’s console


#3

Also use the safari web inspector. While the app is running via XCode, you can use the Develop menu in Safari to examine the app. In fact, XCode will generally NOT show JS failures. You can only see them via the console on the Safari developer tools.


#4

This is great. Thanks a bunch.


#5

@Calendee does this still work in iOS9.0.x?

I have my app running on an iPhone connected to Xcode but in:
Safari > Develop > computer host.name > No Inspectable Applications

Thanks,
skotturi


#6

I believe it does as long as the phone is also configured for web inspection. On iOS go to Settings -> Safari -> Advanced and turn on Web Inspector.

However, the Safari Web Inspector is simply terrible. I’d suggest you use GapDebug instead.