Problem with breakpoints in XcodePosted on September 6th, 2007 12 comments
I'm running Xcode 2.4.1
I have an odd breakpoint problem that I have not seen written about. I can set breakpoints no problem, my program will break correctly. My problem is when I run my program again, though the breakpoints appear marked correctly in the UI and in the breakpoint window, none of the breakpoints break. Going to the command-line GDB (GNU debugger) via <Option><Apple> (must be in the debugger window) I type in "break info" and it reports no breakpoints!
Don't know what happened in my environment for this to start occuring but it is very inconvenient to re-enter all my breakpoints on each invocation. I hope I find the problem soon.
Update: I found the "Stop on Debugger()/DebugStr()" command in the Debug window. This will save me, for now, allowing me to break inside some initialization code which runs before I get a chance to set breakpoints. I just insert a Debugger(); call in the code where I want to "break".
Update: Today, Aug 26, 2008, "xcode breakpoint" is appearing at #1 in Google. In case you aren't reading the comments to this post, Aaron's suggestion:
"In xcode go to Preferences, select the page for Debugging then make sure "Load symbols lazily" is NOT selected"
seems to fix many of the breakpoint issues for most people. It didn't address my particular issue that I described in the post (I think my project has gotten corrupted or something), but it did help me in other instances.
12 responses to “Problem with breakpoints in Xcode”
Breakpoints stop working?
In xcode go to Preferences, select the page for Debugging then make sure “Load symbols lazily” is NOT selected.
This was driving me friggin nuts!
Thanks Aaron. Turning off “Load symbols lazily” DOES appear to help. I’ll have to see if it fixes all my breakpoint issues. I’m also finding it hard to break in multiple threads.
Andy Hanna May 23rd, 2008 at 22:48
< < Turning off "Load symbols lazily" >>
Was most helpful. Thank you.
Vlado July 16th, 2008 at 09:31
This post showed at second position for google query [xcode debug breakpoint stop]. Thank you, Aaron, your advice worked!
Joshua August 26th, 2008 at 09:19
#1 Google hit for “xcode breakpoint”
Thanks a ton, Aaron!
Thanks, Aaron, this was driving me crazy ;-)
Again, Aaron, Thanks. Your comment helped me too.
An observation about when the breakpoints were being ignored: I noticed that in the xcode editor, breakpoints were solid blue as usual when I set them. But as soon as I ran my app, the breakpoints all turned an amber-ish color. Once I unset “Load symbols lazily” the breakpoints both worked *and* remained blue while the app ran. This seems to be an indicator of the useless state of the breakpoints, but not a very helpful one.
Great! Thank you for your tip with those “lazy symbols”.
For me the breakpoints it set sometimes were not recognized. And if the processor reaches a breakpoint that was deleted before, the gdb jumped in.
Now after disabling the option it’s working.
You are a star Aaron! This was driving me frickin bonkers and your advice relieved me of my torment :)
Cheers, breakpoints now working as expected ! Thanks for the tip.
Actually in 3.1.2 and above I have not experienced much problem with the lazy settings in preferences.
However. There is another issue. Make sure
Debug Information Format is set to:
DWARF with dSYM File
Right click on the target>get info and set in buid preferences.
This fixed it for me.
Leave a reply