user1335015 user1335015 - 1 year ago 120
iOS Question

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

I want to see what happens in the iOS Simulator if I'm not testing the app in Xcode.

For example, if I open a link in the Safari simulator, see what happens in the console,
or if I install a web-app, see the links that I'm pressing in console.

How can I do this?

I want to see it in Xcode or Terminal, but it's not a problem if I need to use another bit of software.

Answer Source

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.


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

You can either use the 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


They are now located in ~/Library/Logs/CoreSimulator/<simulator-hash>/system.log

tail -f ~/Library/Logs/CoreSimulator/<simulator-hash>/system.log