views:

558

answers:

3

I'm new to XCode 3.1.2 and Objective-C 2.0. I've just discovered using breakpoints for logging instead of littering the code with millions of NSLog() statements. The problem is, when the debugger starts up it spews half a screen full of status and credits info into the console.

Is there any way to suppress this text?

+2  A: 

XCode debugger is a front end to GDB. If Xcode lets you customize command line for GDB startup, use "-quiet" option.

If it does not, you can "customize" it with a not-so-pretty hack: move gdb executable to another file, and replace it with a shell script that will call the executable with "-quiet" option.

Alex B
This sort jiggery-pokery would be a last resort. I worry that n months from now an update would break it after I'd forgotten what I did.
willc2
+1  A: 
sigjuice
If there is genuinely no "safe" way to do it I would just as soon skip it.
willc2
A: 

You may crete your own gdb wrapper, according to tip from this question: http://stackoverflow.com/questions/668069/how-to-specify-which-gdb-i-can-use-in-xcode-on-macos

Something along these lines:

#!/bin/sh
echo "Wrapped GDB executed with $@"
gdb -quiet "$@"

Into /usr/local/bin/mygdb with:

defaults write com.apple.Xcode PBXGDBPath /usr/local/bin/mygdb

But -quiet parameter is ignored on my 10.6.4 system anyway (XCode 3.2.3, GNU gdb 6.3.50-20050815 (Apple version gdb-1463) (Fri Mar 5 14:24:01 UTC 2010))

Darwin