I am having two problems with the debugger in Xcode 4. The scenario is a static lib and a octest. In both problems, I have a break point in the test and I am trying to step through code in my static lib.
1. When the debugger is GDB, the variable view shows the variables (auto or local, same affect). However, many times I get a messages next to NSStrings stating Invalid summary, or pointers that are local and an object was allocated but it still shows a nil. Sometimes, I just move the mouse into the variable view and they will update. In all cases where the variable view is showing the wrong data due to it not updating, I can view a variable contents via the mouse hovering over the variable and the tooltip. Also, any object in the command window, when queried will give me the correct data. At this point the variable window is useless.
2. I tried to switch the debugger from GDB to LLDB. It hits the breakpoint in the test case but will NOT step into the static lib. It will step into methods inside the test case. It appears that lldb is worse about showing the content of a variable. I have an object called Vertex and a property label called name. The printf statement uses the getters of vertex and correctly displays the information in the console output. However, if I do a po [lastNode name], where lastNode is a type Vertex and a valid object, I get an error: _expression_ failed to execute, unknown error. Note, this very same syntax in my printf argument list correctly provided the name. I thought the syntax is mostly the same for LLDB and GDB(for the most part).
I appears there is a serious latency issue with the variable window updating which maybe part of the problem. If this is the state of the debugger and not something wrong with my install, this is a serious productivity loss. I do have 3.2.6 installed on the box in its own directory, is it possible there is some sort of corruption? I installed Xcode 4 after 3.2, and Xcode4 is in it's own directory, fyi.
Platform Info:
iMac(i7) 8 mb Ram.
OS 10.6.7
Xcode 4.02
Any help or ideas would be greatly appreciated.