Technical Note TN2124
Note: print-object actually calls the debugDescription method of the specified object. NSObject implements this method by calling through to the description method. Thus, by default, an object’s debug description is the same as its description. However, you can override debugDescription if you want to decouple these; many Cocoa objects do this.
If you have debugDescription
implemented, printing the object in GDB will display its result. Knowing that description
is used in UI (I know bindings do that), you may want to use this to print some additional information that user doesn’t need to see.