XCode 4.2 debugger fails to show proper local variable state


#1

I’m trying out a simple test application with JUCE and some of my classes but the Xcode 4.2 IDE
fails to display local variables correctly , and in fact doesn’t show ANY locals that are pointers to class instances.
Also Xcode seems to fail continually to debug at the breakpoints i set up ( in a button click event )

I’ve tried both LLVM and the old GCC.

All optimisation compile options are off.

I remember having the same issues years ago. Namely the debugger didn’t seem to have the right information to match the current program state to the line of C++ code being stepped through.

I also recall there were some issues to do with how source files were terminated.

Ive enclosed the sample dummy project.

It shows a single blue window with a button in the top left corner.

To reproduce - place a breakpoint inside the following code and then run the app and click the purple button.
void Window1_BevelButton1::ON_Action() {

int x;
x = 2;
x = x+1;

x= x+1;

int y = 665;

debby = x;  // ( debby is a member property of class Window1_BevelButton1 )

x = 999;

debby = y;

Class1* i  =  new Class1();

y = x;

debby = debby+1;
debby = y;

Class3* j = new Class3;
j->doSomething();


j = NULL;
 i = NULL;

}


#2

http://lists.apple.com/mailman/listinfo2/xcode-users


#3

i already posted a bug report there, but i suspect there is a workaround.

the app builds and runs fine btw.

its just the breakpoints and debugger.


#4

finally managed to work around this Xcode bug by using the older gcc compiler and faffing around with the Xcode build settings.
What an utter waste of time. Still, hopefully now i can get some work done…

anyone else here ended up having to switch away from using the newer LLVM/ Clang stuff ?. I thought this newer stuff was actually meant to make the debugger BETTER not worse !.