Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Dmitry(RUS)

macrumors newbie
Original poster
Feb 12, 2012
5
0
When I want to watch map, I see a lot of unclear folders.But I only want to see keys and values, is it possible?

Thank You.
 

KnightWRX

macrumors Pentium
Jan 28, 2009
15,046
4
Quebec, Canada
A screenshot of what you mean ? And what is the type of variable you're trying to watch ? Objects are complex and thus watching one will return a complex structure compromised not only of the value of the instance variable you want, but of all its instance variables.

In any case, when you collapse the objects in the debugger, it should give you some idea of the values (for an NSString, it should show you the actual string, for an NSDictionary, the number of key/pairs, for an NSArray, the number of elements in it).
 

KnightWRX

macrumors Pentium
Jan 28, 2009
15,046
4
Quebec, Canada
You don't need a normal site to place photos, just attach them to your forum post. Under the textbox to enter the text for a forum post, you have an "Additional Options" section. The 2nd sub-section is "Attach Files". Just click "Manage Attachments" and upload your screenshot.

Sorry if I'm reluctant to click on any .ru website, I just can't do it.
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,565
When I want to watch map, I see a lot of unclear folders.But I only want to see keys and values, is it possible?

Thank You.

If you had said std::map, then people would know what you are talking about. Remember: We can't read your mind.

Get the latest XCode version, then try debugging with either gdb or lldb, and pick whichever gives better results.
 

Dmitry(RUS)

macrumors newbie
Original poster
Feb 12, 2012
5
0
So, here it is.
 

Attachments

  • Снимок экрана 2012-02-16.png
    Снимок экрана 2012-02-16.png
    347.5 KB · Views: 100

Dmitry(RUS)

macrumors newbie
Original poster
Feb 12, 2012
5
0
I want to see keys too.I now there is nothing there, but when there is something, how can I watch it?

PS
I'm a beginner in Xcode, and I'm not from English-speaking country, so do not judge strictly.
 
Last edited:

gnasher729

Suspended
Nov 25, 2005
17,980
5,565
I want to see keys too.I now there is nothing there, but when there is something, how can I watch it?

PS
I'm a beginner in Xcode, and I'm not from English-speaking country, so do not judge strictly.

std::map is what it is called in C++. I highly recommend using the full names in C++ code and when you talk about it.

And how can you look at a std::map when it isn't empty? Well, you try it. Set a breakpoint a bit later after you assigned to it. Or, just for experimenting, add something in your code and set a breakpoint, to try it out. Then you have the choice between two debuggers. And finally, you can add code that prints the contents of the map.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.