Reputation: 14342
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?
Upvotes: 138
Views: 181443
Reputation: 6365
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>"
Upvotes: 88
Reputation: 931
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.
Upvotes: 35
Reputation: 82209
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
Upvotes: 80
Reputation: 15738
The solution documented by Apple in Technical Q&A QA1747 Debugging Deployed iOS Apps for Xcode 6 is:
Upvotes: 165
Reputation: 8236
Try the freeware iOS Console. Just download, launch, connect your device -- et voila!
Upvotes: 14
Reputation: 3700
To view your iOS device's console in Safari on your Mac (Mac only apparently):
Safari's Inspector will appear showing a console for your iOS device.
Upvotes: 0
Reputation: 10104
You have three options:
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.
Upvotes: 2
Reputation: 51
device > terminal output is on iPhone configuration app
here: http://support.apple.com/kb/DL1465
Upvotes: 5