Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change variable description in Xcode variable view

I'm wondering if it's possible to change the description of variables in the Xcode debugger for example: Xcode Debugger

I'd like to change the text in the red boxes to depend on the object itself. Kind of how the NSArray has @"10 elements" as it's description.

like image 326
multitaskPro Avatar asked Jul 09 '26 18:07

multitaskPro


1 Answers

From Xcode Help:

To edit the summary format of a variable, Control-click the variable and choose Edit Summary Format… from the shortcut menu.

In the popover, enter a valid LLDB expression and click Done. This expression overrides the default formatter and is used to create a summary for all variables of this type.

like image 144
Willeke Avatar answered Jul 11 '26 18:07

Willeke