XCode: Problems with the debugger

I am having serious issues with the debugger NOT stopping at break points, doing a step into or step over causes the program to just run and not step to the next statement.

I have the debug mode on, I have it set to zero optimizations, full symbols, full debug. What else do I need to do so I can step through my code without it running away? I have done cleans, and full rebuilds, tweaked some linker flags, but no matter what I do, I can't step through a program reliably and even if I have 50 break points in, it will skip them all.

EMac, Mac Mini, Mac OS X (10.4.6)

Posted on Sep 16, 2008 10:02 AM

Reply
19 replies

Oct 1, 2008 7:46 AM in response to TheSilverHammer

Is it possible you have a custom project template that is overriding the default template, and that would have survived the uninstall/reinstall process? (Look in /Library/Developer Tools/Shared/Xcode/Project Templates or /Library/Developer Tools/2.5/Xcode/Project Templates, or the equivalent path under your home directory.)

I believe DWARF has been the preferred format since Xcode 2.4, but there are some reasons to prefer STABS (although I don't recall them since I haven't personally encountered them). You may have to google around for this; sorry I can't be more helpful there.

Oct 1, 2008 8:49 AM in response to Russell Finn

I didn't find any extra project templates where you suggested. However I did a search for "Project Templates" and found two locations. I installed XCode again and rebooted. The 2nd templates was still there, in /Library/Application Support/Apple/Project Templates. It looked like the same XCode stuff, so I nuked the folder and rebooted again hoping I didn't screw something up. It reboots, and I search and there are no project templates directories. I reinstall XCode 2.5, reboot, make a new c++ cmd line tool, and both debug and release are identical. Oh well.

Oct 1, 2008 9:15 AM in response to TheSilverHammer

Well, you know what? I tried it out, and got the same thing -- on 2.5 the Debug and Release configurations appear to be identical. How bizarre. Sorry to waste your time.

On 3.1, there are subtle differences -- both configurations compile with the same compiler flags, only the Release configuration uses "DWARF with dSYM" instead of "DWARF" -- i.e. the debugging symbols are in separate files, not in the output application -- and it performs some additional stripping as well. But both configurations generate debugging symbols. (For optimization, Debug uses -O0 while Release uses -Os.)

None of this solves your original problem, of course. Sorry I couldn't be more help. (For what it's worth, I think Xcode 3.1 is a big improvement over 2.5, if that helps you decide to upgrade...)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

XCode: Problems with the debugger

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.