While debugging a program in Xcode I have several CFStringRef variables that point to strings with lengths around the 200 character mark.
In the debugger, it only shows the value of these strings up to a certain length and then just ellipses them away. I’d really like to see the full value of the strings.
Is there some option I can configure so it doesn’t terminate them at arbitrary length?
In the debugging console you can get the string value by doing something like:
or:
Either of those will display the entire string’s contents to the debugging console. It’s probably the easiest way to deal with large, variable-length strings or data structures of any kind.
For more information, the
printcommand in the debugger basically dumps some data structure to the console. You can also call any functions or whatever, but since print doesn’t have access to the function declarations, you have to make sure you provide them implicitly (as shown in the example above), or the print command will complain.pois a shortcut forprint-objectand is the same as print except for Objective-C objects. It basically functions like this:This is really useful for examining things like
NSDataobject andNSArray/NSDictionaryobjects.For a lot more information on debugging topics, see Technical Note TN2124 – Mac OS X Debugging Magic and (from the debugger console) you can issue the
helpcommand as well.