Testing/debugging QLThumbnailProvider on macOS

I'm implementing the 'new' QLThumbnailProvider for our macOS app...

So I just created the skeleton from Xcode, added our QLSupportedContentTypes in Info.plist, and have the skeleton code like below:

import QuickLookThumbnailing

class ThumbnailProvider: QLThumbnailProvider {
    override func provideThumbnail(for request: QLFileThumbnailRequest, _ handler: @escaping (QLThumbnailReply?, Error?) -> Void) {

    // cannot trigger break point here!

}

I understand I should test the Thumbnail Extension by using:

$ qlmanage -t my_file.ext
Testing Quick Look thumbnails with files:
	my_file.ext

But I don't know what process to attach to in the Xcode debugger... a bit clueless...

I've skimmed relevant parts of https://developer.apple.com/videos/play/wwdc2019/719, but there is no real debug tips...

Does anyone know if it is possible to debug with Xcode or not? And if possible, then how? 😅

Accepted Answer

After days of trying all kinds of weird stuff I finally got something to work! 😅

Findings:

  • I never got qlmanage -t to trigger anything for my Thumbnail Extension 😑
  • Even though I used qlmanage -r, qlmanage -r cache and killall -9 QuickLookThumbnailing QuickLookUIService Finder I never got it to trigger.
  • Even though I used pluginkit to see that my plugin thumbnail extension was registered AND enabled I never got it to trigger.
  • log stream --predicate 'subsystem == "com.apple.quicklook"' was basically useless to me.
  • Logging out and in of my compute made no difference.

But then finally I tried to REBOOT my computer and then suddenly it started to work if I used the Finder app only! (qlmanage -t is still useless.)

Holy cow I spent forever on that... 🙈

(macOS 15.4.1)

THANK YOU SO MUCH! I did as you suggested - I rebooted my Mac, and d*mn I can now get it to work!!!

I'm running the Thumbnail Extension in Xcode, added breakpoints, and NOW they get hit.

BTW - it's just not obvious (IMHO) from the docs, but the thumbnail is NOT the view that is shown in Finder windows to the right of the files (when you select a file). That is a Preview view. The Thumbnails are shown in Finder windows (list or icon view) - so they are pretty small. Maybe there are other views you see them in?

PS: using latest Xcode and Mac as of 11/2025

@dhoerl great that you could use my 'you need to reboot your Mac' finding... 😅

As I understand it Thumbnails and Previews are related.

Thumbnails are small and quick to render.

Previews are for bigger/better examples of your file, e.g., if you hit space-bar in the Finder on the file.

If Preview is not implemented it may fall back to the Thumbnails-based solution.

😀

Testing/debugging QLThumbnailProvider on macOS
 
 
Q