How to Get the Console Logs from the iOS Simulator

How can I get the console logs from the iOS Simulator?

iOS Simulator > Menu Bar > Debug > Open System Log


Old ways:

iOS Simulator prints its logs directly to stdout, so you can see the logs mixed up with system logs.

Open the Terminal and type: tail -f /var/log/system.log

Then run the simulator.

EDIT:

This stopped working on Mavericks/Xcode 5. Now you can access the simulator logs in its own folder: ~/Library/Logs/iOS Simulator//system.log

You can either use the Console.app to see this, or just do a tail (iOS 7.0.3 64 bits for example):

tail -f ~/Library/Logs/iOS\ Simulator/7.0.3-64/system.log

EDIT 2:

They are now located in ~/Library/Logs/CoreSimulator//system.log

tail -f ~/Library/Logs/CoreSimulator//system.log

Viewing Console.log in ios simulator

You can watch the console.log with a safari-browser. Open the ios-simulator or connect the ipad by usb. Open safari and take a look in the menu "developer". Choose your web-site and the web-inspector will open.

more info here:

https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/DebuggingSafarioniPhoneContent/DebuggingSafarioniPhoneContent.html

How to show simulator logs? in IOS 12.0 & Xcode 10?

I have found solution for this issue, Open system console log on MAC

⌘ + space and type "console" -> press "Enter" to open system console log then select your simulator

You can see only log which is log using

NSLog("MyLog")

But, You can not see log which is write with print("MyLog")

How to see logs when running app in iOS simulator directly?

Depending on the runtime version, you can use one of:

xcrun simctl spawn booted syslog -w
xcrun simctl spawn booted log stream
tail -F "$(xcrun simctl getenv booted SIMULATOR_LOG_ROOT)/system.log"

If you're on macOS Sierra, you can also select the simulated device from within Console.app to see the logs.



Related Topics



Leave a reply



Submit