Does anyone know how to view console.log()
from the Xcode simulator using capacitor? I am aware that you can view the system logs via iOS Simulator > Menu Bar > Debug > Open System Log (How can I get the console logs from the iOS Simulator?), but this does not show any of the console.logs when using capacitor to run an ios application.
Getting IOS console from Capacitor
Asked Answered
I couldn't get the Ionic instructions to give any output via Safari's dev tools.
However, Capacitor's solution is its built-in Console API https://capacitorjs.com/docs/v2/apis/console
The Console API automatically sends console.debug, console.error, console.info, console.log, console.trace and console.warn calls to the native log system on each respective platform. This enables, for example, console.log calls to be rendered in the Xcode and Android Studio log windows.
I was able to see the logs in Xcode's logging as long as the build isnt broken in some way.
© 2022 - 2024 — McMap. All rights reserved.
devtool
– Parsee