The most reliable choice is to use NSLogfor debugging purposes, but printlnmay work in this case. You just need to attach the Xcode debugger to the extension itself.
In my experience, this is a pretty bad process. This answer contains additional information on this. In short, you need to change the goal in the Run drop-down list before your extension, and then, after clicking the Run button, you should get a list of things that you can run it on.
source
share