2

For some reason, Xcode has stopped showing the value of 'self' when debugging (it just says 'self' and nothing else. Local variables are showing, though. Also if I add valid values with Add Expression, they always say Invalid Expression.

It used to work well until a while ago, although I can't determine when it last worked. The debugger seems to work well for other projects, so I'm guessing it's something in the project settings.

I've inspected build settings, and made sure that optimization values are set to None [-Oo] for debug (and None [-Onone] in Swift).

I've also made sure that the current scheme is Debug, and that Debug Scheme has 'Debug executable' selected.

This is a Swift project, with some Objective-C files, and it's in Xcode 6.4 (6E35b).

How can I get Xcode to show the value of 'self' again, and to display values of expressions that I add in the debugger?

5
  • I have the same issue! Let me know if you figure out how to solve it! Commented Aug 15, 2015 at 4:28
  • I'm still struggling with this... I figure that there must be something in the project settings that I changed accidentally, because if I revert way back to an older version of the code, the debugger works normally. Unfortunately, it's so far back that even using those settings isn't an option. Commented Aug 16, 2015 at 21:02
  • For my situation, I think it had to do something with crashlytics. Do you happen to have that installed? Commented Aug 16, 2015 at 22:32
  • @AustinT I do!! Do you happen to remember what you did? Commented Aug 17, 2015 at 13:44
  • @AustinT you were right! I just uninstalled Crashlytics to see what would happen, and the variables are back! I'll post a full answer when I figure out the correct installation. Commented Aug 17, 2015 at 14:31

1 Answer 1

1

Finally solved this.

@AustinT and anyone who runs into this:

The problem for me was caused by a double installation of crashlytics, through cocoapods and through traditional installation. I tried to leave only the cocoapods version for hours, following the official guide, but I couldn't get it to work. I got a 'not found' message on the build phase script.

So eventually I gave up and just left the traditional installation version, and erased every mention of the pod version in the project.

The debugger went back to normal, and life is good again.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.