Is there a way to view the real-time console log to view NSLog and other debug messages in a real-time manner, such as adb logcat?
-
1Are you saying you want some IOS equivalent of `Utilities/Console.app` ? – BryanH Sep 01 '11 at 23:42
-
possible duplicate of [objective c iphone : can we view console log on device](http://stackoverflow.com/questions/2634929/objective-c-iphone-can-we-view-console-log-on-device) – progrmr Sep 01 '11 at 23:52
10 Answers
The solution documented by Apple in Technical Q&A QA1747 Debugging Deployed iOS Apps for Xcode 6 is:
- Choose Window -> Devices from the Xcode menu.
- Choose the device in the left column.
- Click the up-triangle at the bottom left of the right hand panel to show the device console.

- 15,096
- 4
- 70
- 83
-
5
-
In Xcode 6.4, I see a button saying "View Device Logs", but which gives me crash logs. I don't see a way to get the console log. – Chris Prince Jul 15 '15 at 23:08
-
4
-
i have some `print` statements in my code which are not shown in the device log. Also, the crash trace is not visible. When i run on similator, i get to see `print` as well error trace. Any inputs/guidance how to see entire logs from device ? – Allzhere Sep 24 '16 at 04:14
-
1`print` statements do not go to log, only to `stdout`. Use `NSLog` instead. Or it might be possible to redirect `stdout` to a file with some added code. Crashes are logged and can be accessed using "View Device Logs" button. – Marián Černý Sep 24 '16 at 09:17
-
If only it had a filter so you didn't have to see the miles of garbage that it spits out. @cbowns solution is much better since you can grep on it – Nathan F. Apr 28 '17 at 04:47
-
3This button has been retired in xCode 9.3. It now has a "Console.app" button, which makes way more sense. – rustyMagnet Apr 09 '18 at 15:22
-
@rustyMagnet didn't get the update yet (9.2 atm), can you tell me if these changes finally allow you to filter logs? or are you still stuck with an endless flow of system logs that you can't discard? – itMaxence Apr 17 '18 at 18:10
-
yes @itMaxence. Console.app is much nicer. Lately I have started to use `idevicesyslog` and grep. Really nice, if you want terminal-based logs. Get it here: https://github.com/libimobiledevice/libimobiledevice I recommend you build from source instead of homebrew, as I was getting brew errors. – rustyMagnet Apr 18 '18 at 09:46
-
Ok i'll update sooner that expected then. Yeah I know idevicesyslog but I could not make it works, using homebrew or from the git repo. I am now using DeviceConsole (I had to try several git repo cause some of them are broken). So many efforts for such a simple thing tho :/ – itMaxence Apr 19 '18 at 10:16
Two options:
libimobiledevice is installable via homebrew and works great. Its idevicesyslog
tool works similarly to deviceconsole
(below), and it supports wirelessly viewing your device's syslog (!)
I've written more about that on Tumblr tl;dr:
brew install libimobiledevice
idevice_id --list // list available device UDIDs
idevicesyslog -u <device udid>
with the device connected via USB or available on the local wireless network.
(Keeping for the historical record, from 2013:) deviceconsole from rpetrich is a much less wacked-out solution than ideviceconsole above. My fork of it builds and runs in Xcode 5 out of the box, and the Build action will install the binary to /usr/local/bin
for ease of use.
As an additional helpful bit of info, I use it in the following style which makes it easy to find the device I want in my shell history and removes unnecessary >
lines that deviceconsole
prints out.
deviceconsole -d -u <device UDID> | uniq -u && echo "<device name>"

- 6,295
- 5
- 47
- 64
-
Thanks for this post. It is exactly what I was looking for. I can't wait to add iOS into my GUI mobile LogCat tool: https://github.com/yepher/LogCat – Yepher Jan 10 '14 at 15:51
-
2This is awesome - took 2 minutes to compile and run. This should be the accepted answer. – Nick Farina Apr 18 '14 at 01:11
-
This is a lovely solution. And just wanted to add that the collection still works for iOS8 (as it should!) – Kelly Sep 24 '14 at 16:59
-
-
It works fine, yet - connection by calble is required. Do you know of any solution which could work without a cable (wi-fo or bonjour). In some cases iOS behaves differently when charging or not. – Lukasz Feb 28 '15 at 19:16
-
@Lukasz Not that I know of. Wireless debugging in Xcode was available for Xcode 4 for a while but was pulled due to stability issues. – cbowns Mar 01 '15 at 01:57
-
-
1@BugaBuga Make sure you're using the latest `libimobiledevice`. (Wired and wireless log viewing are working with my Mac on 10.11 and my iPhone on iOS 10.2) – cbowns Jan 27 '17 at 22:14
-
1https://github.com/libimobiledevice/libimobiledevice/issues/356. Use: `brew install --HEAD libimobiledevice`. Worked for me. – rustyMagnet Apr 09 '18 at 15:35
-
Am I the only one getting `zsh: command not found: deviceconsole`? – Felipe Centeno Dec 08 '20 at 16:50
-
@FelipeCenteno try `idevicesyslog`, and `brew list libimobiledevice` to get a full list of the binaries it installs. (they're all prefixed with `idevice` if that helps in tab-completion) – cbowns Dec 10 '20 at 16:32
EDIT: Please use @cbowns solution - deviceconsole is compatible with iOS9 and much easier to use.
This is a open-source program that displays the iDevice's system log in Terminal (in a manner similar to tail -F). No jailbreak is required, and the output is fully grep'able so you can filter to see output from your program only. What's particularly good about this solution is you can view the log whether or not the app was launched in debug mode from XCode.
Here's how:
Grab the libimobiledevice binary for Mac OS X from my github account at https://github.com/benvium/libimobiledevice-macosx/zipball/master
Follow the install instructions here: https://github.com/benvium/libimobiledevice-macosx/blob/master/README.md
Connect your device, open up Terminal.app and type:
idevicesyslog
Up pops a real-time display of the device's system log.
With it being a console app, you can filter the log using unix commands, such as grep
For instance, see all log messages from a particular app:
idevicesyslog | grep myappname
Taken from my blog at http://pervasivecode.blogspot.co.uk/2012/06/view-log-output-of-any-app-on-iphone-or.html

- 80,996
- 26
- 120
- 129
-
4It seems like this doesn't work with the iOS simulator. Bummer. `No device found, is it plugged in?` – ashes999 Apr 04 '13 at 10:59
-
It cannot work on iOS10. "usbmuxd_send: Error -1 when sending: Broken pipe" How to solve it? – Victor Choy Sep 19 '16 at 15:45
-
2When I run idevicesys without sudo, I get a cryptic error about "Could not start service com.apple.syslog_relay". Maybe it depends on how you install it or something. – Bjorn Roche Nov 10 '16 at 15:34
-
Do this if it isn't working for you... `brew uninstall libimobiledevice ideviceinstaller && brew install --HEAD libimobiledevice ideviceinstaller` – Akshet Aug 29 '17 at 19:47
Just open the Application Console.app
on mac osX.
You can find it under Applications
> Utilities
> Console
.
On the left side of the application all your connected devices are listed.

- 797
- 1
- 7
- 19
-
2This is a great solution. I can use the Search feature to basically "grep" the live/"Now" logs for my device. – Rob Feb 28 '18 at 11:48
-
1
-
You can even search the logs by applying various filter like process name, Date & time etc.. – desu sai venkat Sep 06 '21 at 08:25
Try the freeware iOS Console. Just download, launch, connect your device -- et voila!

- 8,168
- 1
- 38
- 37
-
1it's interesting, but it won't let me choose which device to view the console log if I have multiple connected to the Mac. – leolobato Mar 20 '15 at 21:11
-
so simple and works great on iOS 12, I become frustrated with knowing how simple logging should be for a dev and end up here. Thank you Peter – FreeAppl3 Mar 13 '19 at 00:06
-
This might be what you're looking for: Xcode Organizer

- 5,826
- 3
- 34
- 47
-
Yes...but for some reason, the Console on the Xcode Organizer is less real-time because it is inside a GUI window. I was hoping for a way to invoke the shell on the device directly to tail -f
– Arunabh Das Sep 02 '11 at 00:05 -
-
Thanks progrmr. I would like to accept your answer as the correct answer. Could you also please post any links for HowTo on getting a shell on a jailbroken device? Thanks!! – Arunabh Das Sep 02 '11 at 14:15
-
@ArunabhDas Please consider changing the accepted answer to the idevicesyslog answer from Ben Clayton. His solution was exactly what I was looking for to debug In-app Purchases with an iOS app using the CoronaSDK platform. The Xcode Organizer was slow and cumbersome for viewing log information. – Anthony F Feb 18 '13 at 00:24
device > terminal output is on iPhone configuration app

- 51
- 1
- 1
-
1That link is no longer valid. I believe the updated name of the app is Apple Configurator and is available here: https://itunes.apple.com/us/app/apple-configurator/id434433123?mt=12 However, it is OS X 10.10+. – ThomasW Jan 29 '15 at 02:54
-
1@ThomasW: Unfortunately the Apple Configurator doesn't seem to have the ability to view device logs as the iPhone Configuration Utility does/did. – newenglander Mar 10 '15 at 14:02
-
1It does. Just install automation tools from the menu. http://krypted.com/iphone/install-the-command-line-tools-using-apple-configurator-2/ – Sune Kjærgård Apr 09 '17 at 22:19
You have three options:
- Xcode Organizer
- Jailbroken device with syslogd + openSSH
- Use dup2 to redirect all STDERR and STDOUT to a file and then "tail -f" that file (this last one is more a simulator thing, since you are stuck with the same problem of tailing a file on the device).
So, to get the 2º one you just need to install syslogd and OpenSSH from Cydia, restart required after to get syslogd going; now just open a ssh session to your device (via terminal or putty on windows), and type "tail -f /var/log/syslog". And there you go, wireless real time system log.
If you would like to try the 3º just search for "dup2" online, it's a system call.

- 10,016
- 3
- 33
- 46
To view your iOS device's console in Safari on your Mac (Mac only apparently):
- On your iOS device, go to Settings > Safari > Advanced and switch on Web Inspector
- On your iOS device, load your web page in Safari
- Connect your device directly to your Mac
- On your Mac, if you've not already got Safari's Developer menu activated, go to Preferences > Advanced, and select "Show Develop menu in menu bar"
- On your Mac, go to Develop > [your iOS device name] > [your web page]
Safari's Inspector will appear showing a console for your iOS device.

- 3,544
- 1
- 26
- 22
-
3
-
This does work for the emulator... Haven't tried it with an actual device. – sketchthat Oct 04 '17 at 00:16
As an alternative, you can use an on-screen logging tool like ticker-log to view logs without having (convenient) access to the console.

- 23,757
- 20
- 73
- 115
-
That's an in-browser JavaScript solution and the OP was asking about native iOS development (using NSLog etc.). – Richard Fairhurst Jun 14 '22 at 10:01