Question or issue on macOS:
I’m using xcode in C++. I’m trying to debug my project, but at random intervals, it seems to ignore my breakpoints. There are three things that it does:
1) Sometimes, when I run, it automatically switches to “de-activate break points” mode. (the relevant button goes light and says “Activate”)
2) Sometimes when I run, ALL of my breakpoints go “can’t find” mode, with the yellow insides. I need to click twice on them to get them back dark blue (once to light blue = inactive, once to dark blue = active)
3) Sometimes, when I run, my breakpoint is dark blue, the button says “deactivate” and it still just ignores my breakpoint, running straight past it.
This makes it very difficult to debug my program…
I should add that I’m using XCode 3.1 beta on OSX 10.5.6, in case that matters.
How to solve this problem?
Solution no. 1:
Try unchecking the Load symbols lazy in the Debugging panel in Preferences
alt text http://img.skitch.com/20090209-gj947qk7dxdyms1wij4q5em2f2.jpg
Solution no. 2:
Had the same problem but only restarting the iPhone Simulator seemed to fix it.
Solution no. 3:
I faced the same issue right now.
I tried all the options : enabling the GCC, active, base targets and restarting and closing xcode, nothing solved.
I finally restarted the simulator and things have started working.
Solution no. 4:
I have more or less the same set of issues, and this suggestion of loading symbols lazily unfortunately does not resolve it for me. Moreover, I am not developing for the iphone, just a regular application.
To be specific, sometimes I can’t disable or enable breakpoints on the fly – sometimes my code doesn’t stop in breakpoints which I later prove are being executed (with print statements) and nothing I can do will make it stop there – I see that very annoying debug symbol with an orange center, even though I only have one project active.
Quitting and restarting XCode occasionally has an effect – and annoyingly, there have been a very small number of cases where quitting and restarting or rebuilding from clean fixed hard-to-diagnose compilation/linking errors. Unfortunately, I just tried all of these with no effect.
(Unrelated, my keyboard shortcuts are also unreliable. My shortcut of F2 for continue worked for weeks for me, stopped working for a long time, was working this morning and now doesn’t work at exactly the same breakpoint it worked before – yet my F1, step over, key has been completely reliable…)
I’m a little disappointed to have to do so much debugging with print statements!