Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugger is only showing the values of a dictionary and "(no summary)" for the keys

I'm using AFNetworking to grab a JSON feed from our server and then I'm casting the response object that AFNetworking gives me into an NSArray, something I've done a million times before with no problem. The JSON is just an array with each element being a dictionary, nothing too complex.

The issue I'm having comes in when I set a breakpoint after I cast the response object to my NSArray. When the debugger pulls up, it shows the NSArray, shows that each object in the NSArray is an NSDictionary, but when I go to view the contents of the NSDictionary's, it will only displays the values and not the keys. The keys only appear as "(no summary)"

Screenshot of my issue with details blurred out

I've opened up the feed in my browser to double check it, and I used an online JSON validator to make sure the feed is valid and everything looks normal.

For what it's worth, this only started after I updated XCode to the most current version (7.3).

This problem is also affecting at least one coworker of mine, and he couldn't figure out how to fix it either. A fix to make XCode display the keys would be much appreciated.

Update

Almost three years and a new job later, I think I figured out why this was happening - though I can't confirm it since I no longer have access to the original project I was working on.

A few weeks ago I ran into this issue again - my debugger was telling me that some items were nil, gave 'no summary' on some dictionary keys, etc. It was driving me crazy.

The console gave me some hints as to what was going on by saying it was compiled with optimizations which may lead to debugger issues (or something along those lines) but that just led me to removing the optimization flags in the debugger. This just made my builds slow and did nothing to make my debugger act right.

As it turns out, at some point I had changed my scheme's build configuration from 'Debug' to 'Release'. In the 'Release' configuration symbolic debug information is not emitted and code execution is optimized - hence why the console was yelling at me that my code was compiled with optimizations and why my debugger was acting up.

Switching the Scheme's build configuration back to 'Debug' solved my issue.

While I don't know if this actually solves my original problem, it solved a similar one. Hopefully this will help others that stumble upon this question.

like image 282
tww0003 Avatar asked Nov 04 '25 23:11

tww0003


1 Answers

I have the same problem. When I try debug with iPhone 5s Simulator, I see the same results as you:

iPhone 5s Simulator

But in iPhone 5 Simulator it is O.K :)

iHone 5 Simulator

Try use another Simulator (5 or 4s)

like image 101
lveselovsky Avatar answered Nov 06 '25 15:11

lveselovsky



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!