1

I have a quicklook plugin which generates Finder thumbnails and QuickLook Previews for my custom file extension for files in my Virtual File System (developed via FUSE).

The problem is that on macOS Catalina, QuickLook Preview doesn't work for files with specified extension. Usually, I debug this by having GenerateThumbnailForURL.m 'echo' debug text to a file on Desktop OR NSLog or os_log so that content is visible in Console.app.

However, when Console.app displays the log text from my plugin, it is shrouded with <private> items instead of actual content.

Is there a way to circumvent this for Console.app or some other way in which QuickLook plugin can be debugged on macOS Catalina?

I tried this but it doesn't seem to work on macOS Catalina 10.15.3.

mixtly87
  • 1,675
  • 15
  • 32
  • 2
    I successfully followed the debugging steps from [Debugging Quicklook Plugin in Xcode](https://stackoverflow.com/questions/16811547/debugging-quicklook-plugin-in-xcode) in macOS Monterey 12.x. – Cœur Apr 27 '22 at 15:20

2 Answers2

2

You should not use GeneratePreviewForURL for quicklook preview generation on Catalina.

Instead, one should implement the QuickLook Preview Extension target. Launching the target will open the debug session where everything can be debbuged in classical way.

Btw, echo-ing from GenerateThumbnailForURL.m should no longer work on Catalina because the extension doesn't have write permissions.

mixtly87
  • 1,675
  • 15
  • 32
1

Yes, you can still debug Quick Look Plugins on macOS Catalina. I am on 10.15.6 and using the following:

  • Add NSLog(...) statements to your code.
  • Build your .qlgenerator file and install it into ~/Library/QuickLook
  • run qlmanage -r to activate your new plugin
  • run qlmanage -p someFile to run the preview generation and see the NSLog statements of GeneratePreviewForURL in the Terminal.
  • run qlmanage -t someFile to run the icon generation and see the NSLog statements of GenerateThumbnailForURL in the Terminal.
Cœur
  • 37,241
  • 25
  • 195
  • 267
MiB
  • 11
  • 2
  • 1
    Correct, QuickLook Plugin debugging works in macOS Catalina or even macOS Monterey. For improved debugging experience, there is a dedicated question: [Debugging Quicklook Plugin in Xcode](https://stackoverflow.com/questions/16811547/debugging-quicklook-plugin-in-xcode) – Cœur Apr 27 '22 at 15:23