Is it possible to construct custom views for complex objects?
Specifically I want to view the inner workings of a CGPath.
I've found the "view variable as" option with right clicking the variable in the debug view, and I've seen ways to view (eg) strings &tc with it, but I haven't found anything that helps me in this case.
po pathin the debugger will print out all of the path's elements.UIBezierPathhas quick look support in the debugger, where you can hit space and view a drawing of it, but you have a CGPath. It seems that quick look support is not enabled for CF classes like CGPath.But you're not stuck. If you right-click the variables list in the debugger (as shown here), and choose add expression, you can create a local
UIBezierPathby typing this in the expression field:or, if your debugger is in an Objective-C context:
Your expression then shows up in the list, and you can press the space bar to see a visual representation.
This example shows how I have it set up in an Objective-C project:
Quick-looking the path shows this:
If
po pathisn't showing you any components (moveto, curveto etc) in the debugger, then I think you have an empty path, and your problem lies elsewhere. IfotherPathis nil, then I get an invalid expression in the debugger when creating the bezier path.