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

user1335015 picture user1335015 · Apr 15, 2012 · Viewed 141.3k times · Source

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

fbernardo picture fbernardo · Apr 15, 2012

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/<sim-version>/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/<simulator-hash>/system.log

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