Prints the attributes of a string during debugging.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
The string whose attributes you want to print.
Use this function to learn about specific attributes of a CFString object during debugging. These attributes include the following:
Length (in Unicode characters)
Whether originally it was an 8-bit string and, if so, whether it was a C (
Has) or Pascal (
Whether it is a mutable or an immutable object
The allocator used to create it
The memory address of the character contents and whether those contents are in-line
The information provided by this function is for debugging purposes only. The values of any of these attributes might change between different releases and on different platforms. Note in particular that this function does not show the contents of the string. If you want to display the contents of the string, use
You can use
CFShow in one of two general ways. If your debugger supports function calls (such as
gdb does), call
CFShow in the debugger:
You can also incorporate calls to
CFShow in a test version of your code to print descriptions of CFString objects to the console.