protocol CustomDebugStringConvertible

A type with a customized textual representation suitable for debugging purposes.

This textual representation is used when values are written to an output stream by debugPrint, and is typically more verbose than the text provided by a CustomStringConvertible's description property.

Note: String(reflecting: instance) will work for an instance of any type, returning its debugDescription if the instance happens to be CustomDebugStringConvertible. Using CustomDebugStringConvertible as a generic constraint, or accessing a conforming type's debugDescription directly, is therefore discouraged.

See Also: String.init<T>(reflecting: T), CustomStringConvertible

Inheritance View Protocol Hierarchy →
Import import Swift

Instance Variables

var debugDescription: String Required

A textual representation of self, suitable for debugging.


var debugDescription: String { get }