ma11hew28
ma11hew28

Reputation: 126329

Xcode: View Console History After Cleared?

How can I see the Xcode console history? I accidentally cleared it by running the application again and am wondering if I can get back what was cleared.

Upvotes: 10

Views: 3895

Answers (2)

huse
huse

Reputation: 344

Xcode 11:

In the Navigator, press the "Report navigator" button (the speech bubble), then click on your previous run sessions. You can see all your previous console logs.

enter image description here

Upvotes: 10

kortina
kortina

Reputation: 6101

Xcode console output is logged in the system log. You can search the system log from the console with grep:

# view last 2000 lines of the system log
sudo tail -n2000 /private/var/log/system.log

# search system log for YourApp
sudo grep YourApp /private/var/log/system.log

# watch the system log as it's being written and filter for YourApp
sudo tail -f /private/var/log/system.log | grep YourApp

Upvotes: 13

Related Questions