Weird Behaviour of Xcode 11 Debugger - Showing Values as Nil When There's a Value

Debugger falsely shows object as nil until object has been used

The real answer is Tommy's comment to this old question of mine. It was a Xcode newby mistake. Sorry to have left this hang out there so long,

lldb optional Date it's never nil

As @Joakim Danielson mentioned in comments this is the bug in lldb mentioned here: i was thinking the problem was the struct Date but it's not, it's the lldb itself.

Why aren't Xcode breakpoints functioning?

First of all, I agree 100% with the earlier folks that said turn OFF Load Symbols Lazily.

I have two more things to add.

(My first suggestion sounds obvious, but the first time someone suggested it to me, my reaction went along these lines: "come on, please, you really think I wouldn't know better...... oh.")

  1. Make sure you haven't accidentally set "Active Build Configuration" to "Release."

  2. Under "Targets" in the graphical tree display of your project, right click on your Target and do "Get Info." Look for a property named "Generate Debug Symbols" (or similar) and make sure this is CHECKED (aka ON). Also, you might try finding (also in Target >> Get Info) a property called "Debug Information Format" and setting it to "Dwarf with dsym file."

There are a number of other properties under Target >> Get Info that might affect you. Look for things like optimizing or compressing code and turn that stuff OFF (I assume you are working in a debug mode, so that this is not bad advice). Also, look for things like stripping symbols and make sure that is also OFF. For example, "Strip Linked Product" should be set to "No" for the Debug target.



Related Topics



Leave a reply



Submit