Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Quicklook debug command in LLDB?

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:

enter image description here

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?

like image 215
bpapa Avatar asked Mar 26 '14 14:03

bpapa


2 Answers

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.

Quicklook

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.

like image 188
Jayson Avatar answered Sep 18 '22 14:09

Jayson


I don't think it is possible. At least I could not find a suitable command in Apple's documentation.

The only way I can think of, is modifying your code to assign the image in a UIImage variable and quick look that...

like image 41
Marcos Crispino Avatar answered Sep 16 '22 14:09

Marcos Crispino