Xcode Filling Log Files

Posted by Thoughts and Ramblings on Friday, June 13, 2008

If anyone has ever used Xcode, and tried to debug an app through console messages, then they know how annoying this can be without the development tools getting in the way. An example for me is debugging a frontrow plugin, where sometimes it is easier to print debug info to the console rather than the trouble of using a second machine to fire up gdb. Anyway, Xcode is very good at spewing lots of extraneous and effectively useless information to the console log, such as the following: 6/13/08 5:19:17 PM Xcode[32580] Xcode(32580,0xb0103000) malloc: free_garbage: garbage ptr = 0x456bee0, has non-zero refcount = 1 Of the past 4000 messages in the console, over 3500 of these were xcode. That’s including debugging information from my programs. This is one of the most annoying examples of development tools hindering the development they are supposed to enable.

Anyway, I got tired of it, so I decided that I will no longer launch Xcode the normal way. Instead, I just execute this in the terminal:

/Developer/Applications/Xcode.app/Contents/MacOS/Xcode >& /dev/null &

Very simple command, but the result is Xcode is no longer filling log files. Now, the log files are actually useful. Apple, you really need to do something about this. It says something bad about your development ability when you development tools destroying one of the best diagnostic tools on the OS.