How to see NSLog() from console app when using instruments

I'm using instruments for allocations, but want to see my NSLog messages. In another post they mentioned to look inside /Applications/Utilities/Console for the messages. I can't seem to spot any of them. After you open the Console App, where would you look?

Answers


You can view the console of the device using Xcode Organizer.

In Xcode 6, the "Devices" tab was removed from the Organizer into it's own window. To view the console log, you now have to click the tiny little triangle in the lower left-hand area of the device information.


Alternative to Black Frogs answer, you can also use the integrated console from your mac directly without Xcode. All output is forwarded there. Just do a spotlight search (CMD + Space) and type in console.


If you want to use the Console Application, the Xcode log can be found under the FILES section in the Log List (If not visible:Menu -> View -> Show Log List). Look for

~/Library/Logs/iOS Simulator/6.1/system.log

This is actually just a reference to the file system. So you could to a

tail -f ~/Library/Logs/iOS Simulator/6.1/system.log

in the Terminal as well.

Update:

Another option in some newer versions of Xcode can be found in the Xcode 'Debug' menu. Look for the entry 'Open System Log...'.


As of Xcode 6.3.1, I couldn't find the log in any of the above locations when running the Allocations instrument. For me, in iOS Simulator (not Xcode), click Debug -> Open System Log... to get the NSLog messages normally appearing in Xcode. In case you need it, this log is kept in Library/Logs/CoreSimulator/[device name]/system.log. To get [device name], go to Xcode, Window -> Devices and find the device that you are currently simulating. Look for the Identifier. Compare that against the folder names in Library/Logs/CoreSimulator and you should find a match.


Need Your Help

Hide The iPad Keyboard By Hitting the Return Key

jquery html ipad ios keyboard

Is it possible to hide the iPad keyboard after entering a value into an input field on a website by hitting the Return key without forcing the user to use the Hide Keyboard key?

Can you GROUP BY with a CASE WHEN THEN alias name?

mysql sql group-by case

I have a SELECT statement being calculated from a CASE WHEN THEN state (or could use multiple IF statements) aliased as 'Length', and I need to correctly GROUP the results together. The SELECT seem...