Xcode Debugger Doesn't Print Objects and Shows Nil, When They Aren'T

Xcode debugger doesn't print objects and shows nil, when they aren't

Are you sure you are not in "Release mode"?

If you want to see variable values you have to be in "Debug mode" (click on your project name on the top left corner near start/stop buttons, then "Edit scheme...", then "Run" settings, then "Info" tab, then "Build Configuration". Here set "Debug". If it was on "Release" that's the matter you saw all nils).

Xcode debug inspector shows values as nil

Check your scheme - Run tab on the left should have the Debug executable option checked.

If you are running on AdHoc \ Release mode, the debugger will not show the right values.

Change the "Build Configuration" to "Debug".

Xcode debugger doesn't print object also not showing any error message

After checking all the buttons in debugger window, found there is button at bottom (default selected "All Output") which popup drop-down when we click on it.

This was set to 'Target Output' which causing the problem. Select option either 'All Output' or 'Debugger Output', then we can get values of variable/object when we say po variable/object.

Solution

Instantiated optional variable shows as nil in Xcode debugger

It appears I've found a bug in Xcode 11. It's easily reproducible as outlined in the UPDATE above. I've filed the bug with Apple.

I'm still looking for a workaround now, since I use quite a few structs containing Date variables. If anybody can find one, please comment below.

Xcode 5 debugger doesn't print objects

I found a way to fix this issue. The problem was that my personal internal framework was declaring a method in a category on NSObject called:

- (void)performBlock:(void (^)(void))block afterDelay:(NSTimeInterval)delay;

But a third party framework (here BlocksKit) was declaring the same kind of method:

- (id)performBlock:(void (^)(void))block afterDelay:(NSTimeInterval)delay;

Those two seemed to interfere in LLDB's runtime and were producing this strange message. To fix it, I just changed one of the method name. Please let me know if this work for you.



Related Topics



Leave a reply



Submit