PDA

View Full Version : Xcode 4.3.1 debugging oddness




simplecow
Mar 20, 2012, 09:42 PM
Hi all,

I have a strange error when trying to debug my program. My usual method of debugging is to set a breakpoint, run the application, step into each line of code and hover the mouse over the relevant variables to determine their values and make sure everything is happening as planned. This usually presents information such as this:

intMyVariable int 12

Which is great! It tells me the name of the variable, the type and its current value.

On one of my current projects, however, there seems to be a problem with this form of debugging. When I hover the mouse over a variable, it displays something similar to this:

intMyVariable $5 "MainViewController.myMethod"

If I move the mouse away and hover it over the same variable, the "dollar sign value" will increment by 1, and will continue to do so ($6, $7), almost as if it is counting the number of times I'm hovering the mouse. Obviously, this doesn't provide any helpful information about the variable at all!

The application still works, and outputting the values via NSLog shows what the actual value should be - so this is not necessarily affecting the code, just my preferred method of debugging.

Have I done something to cause this, or is it most likely something within 4.3.1 that's not working well on my computer?

Thanks for any help.



MuTaTeD
Mar 26, 2012, 04:39 AM
Please see: http://vandadnp.wordpress.com/2012/03/18/xcode-4-3-1-cannot-attach-to-ios-simulator/

I managed to find the issue. The problem is with LLDB. LLDB is the default debugger which Xcode 4.3.1 chooses for every new iOS app. Once I changed my debugger from LLDB to GDB, I can run and debug my iOS apps on iOS Simulator. I hope this will be of help to those facing the same issue.

To change the debugger from LLDB to GDB,
1. Go to Edit Scheme.
2. From the Left menu, select Run Configuration.
3. In the Info Tab, change the debugger from LLDB to GDB