xcode - NSIndexPath: a useful lldb summary string -
while debugging lldb in xcode see in debugger window simple summary string nsindexpath objects. like:
indexpath = (nsindexpath *) { section=2 : row=0 }
would more helpful displayed lldb default:
indexpath = (nsindexpath *) [nsindexpath * @ scalar section]
i did try many summary string formatters written .lldbinit file, these among them:
type summary add nsindexpath --summary-string '${var.section}'
type summary add nsindexpath --summary-string '${[var section]}'
type summary add nsindexpath --summary-string '[${var section}]'
type summary add nsindexpath --summary-string '[${var} section]'
the result first 3 is:
indexpath nsindexpath * error: summary string parsing error 0x08e309a0
and last 1 is:
indexpath nsindexpath * [nsindexpath * @ scalar section] 0x08a45b80
which not more helpful neither.
do know how force lldb display more useful summary string nsindexpath?
(lldb) type summary add nsindexpath -s "${var%@}"
this show same output that
(lldb) po myindexpath
would - @ cost of running expression every time you're looking @ index path, may or may not want
Comments
Post a Comment