Give Me a Break
I’m trying to debug a problem using Xcode’s debugger. All should be well, except the dang thing won’t break for me!? I have an NSLog statement and a breakpoint set on the line of code just before that NSLog. I see the log entry[1] but no break. ugh. I’ve sprinkled breakpoints throughout my code and haven’t hit any of them. Oh well, the day is over, time to shutdown and hope Xcode breaks in the morning.
update after a nice nights sleep:
I haven’t felt this stupid in a while. The problem was that I was building and attempting to debug in the “Release” build configuration. Doh. Breakpoints don’t work when debugging release. I’m sure this burns a handful of people. Too bad Xcode couldn’t see me loading a release built binary into gdb and popup a nice “hey bozo, you sure?” message. Oh well, all is better now that I switched back to debug. I’m not sure how I switched to release to begin with. I have a separate sandbox for doing those tests.
[1] I guess I should be happy that NSLog is working


August 1st, 2007 at 10:57 am
I just had a bad experience with breakpoints myself. My breakpoints weren’t breaking and I WAS building for debug. NSLog worked. I finally started a new project and everything was fine. I noticed the breakpoints were black when they worked and dark-yellow when they didn’t. I wonder what that means?
This was really bad for me because I’m just getting started and I assumed the drag-n-drop callback which i was implementing weren’t getting called and I was setting up the app wrong. Sigh.
August 1st, 2007 at 11:12 am
My bad. It WAS that I was building in Release mode. So nice of XCODE to let me know I couldn’t debug.