Let's say I have a UIImage
that I'm setting for a UIButton
. I want to look at it in Quicklook. But oh no:
There's no way for me to quick look debug what the image is.
But I could do something from LLDB to get the image, like [getAppButton imageForState:0]
(well, I could if it wasn't for the undoManager bit but that's not neither here nor there), but is there a way to quicklook that?
I'm not sure when this was introduced, but in Xcode 6.3.2 you can right click on the left panel in the debug area and choose Add Expression...
. This pops up a text field where you can put in any arbitrary LLDB expression. After entering it, you can invoke quick look on the expression just like any other local variable in that pane.
You can also reference variables defined in LLDB, for example if you were to type:
(lldb) e UIImage *$img = [button imageForState:0]
You can then reference that $img
as the expression in the left pane.