Since updating Xcode, my C++ project does not show the values of any floats in the debugger: When mousing over variables or viewing their values in the variables view, floats always display a value of zero, while ints, strings and bools display correctly.
Dead simple example project here: http://www.flyingbreakfast.com/misc/Debugger-bug-Xcode-5.0.2.zip
float exampleFloat = 9; // Displays 0 in debugger/variables view
int exampleInt = 9; // Displays 9 in debugger/variables view
exampleInt += 0; // Breakpoint on this line
Typing print exampleFloat
in the LLDB prompt prints the correct value of 9, and logging the value to stdout also prints the correct values. This bug applies to all floats, not just locals.
I have checked to make sure that the project is set to build in debug, is set to optimization O0, and is not set to strip debug symbols.
This issue occurred in Xcode 5.0.1 as well.
Right click on the variable in the Variables View and select "Edit Summary Format…" and check if there is anything in that text field. In my case, there was a zero in that field.
It's working fine for me. Are you sure there isn't something else going on?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.