QuickLook Image in AppCode

This may be of interest to you if you would like to view UIImages of variables while debugging.

In Xcode, clicking the "eye" icon on a UIImage variable displays the actual UIImage.  (Generically, it will quicklook any object that has a -(id)debugQuickLookObject).  This is extremley useful if you are debugging image drawing/manipulation.

As far as I can tell, AppCode doesn't support quicklooking an image (actually quicklooking at all).  (If it does, please tell me!) And Xcode itself doesn't support quicklook as an lldb command, meaning you can't set a breakpoint and have it automatically quicklook an image when hit.  (If it does, please tell me!)

However, there is a great utility https://github.com/ryanolsonk/LLDB-QuickLook that provides a command and also gives a semblance of the quicklook command in AppCode.  It doesn't actually launch the image (i'm asking the author about that), but it will save the image and print out a path to that image.  I combine this with an External Tool that opens a path from the clipboard to see the UIImages from a variable in AppCode.

My external tool "Open Path From Clipboard":  /usr/bin/open $ClipboardContent$

So the process goes like this:
(lldb) ql markedUpImage
Data written to /tmp/clashofclanstracker/UIImage_4069497218.png
<copy path above>
<hit command key that is mapped to "Open Path From Clipboard">

1 comment
Comment actions Permalink

Hi David.

Thanks for the tip!
In addition, here is a feature request about QuickLook support: https://youtrack.jetbrains.com/issue/OC-4369. Feel free to comment or upvote.

0

Please sign in to leave a comment.