Is there an option to see console.log
s 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.
Is there an option to see console.log
s 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.
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
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.
This is great. Thanks a bunch.
@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
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.