Debugging works for me using the following:
- ALL binaries involved are for a single platform, including XCode, the debugger, and the host. I only get it working for intel binaries on intel machines involving all intel apps. Trying to debug PS in PPC mode for PPC plugin binary on intel fails. The debugger then reports that it can not determine the binary type of the executable (PS).
- Photoshop points to the build directory to look for the plugin binary. I have my build directory set to a custom repository folder, so it does not necessarily have to be the project folder as far as I can tell.
- Obviously, a plugin project requires an added executable = Photoshop. I have no additional settings, vars or scripts.
- In the XCode project settings, make sure that ALL optimization options are OFF. These are not OFF by default, even though the projects come with a default "debug" setting.
TIP: You can select the project file and make settings, and you can select the target file and make settings. The latter overwrites the former. I have the target settings set to have NO custom settings whatsoever. This ensures that there is only one place where I make settings which are dense enough as it is...
- Breaking works on the first invocation of the plugin only. With subsequent invocations the link is lost, which I presume has something to do with PS unloading the binary. I recall a similar problem back in the old days of components where a glue component was suggested to do your own loading and unloading of code.
As for pains:
My biggest issue currently is obsolescence of the host technology for Filter plugins.
- When processing events in the plugin GUI, I frequently receive the same event during host callbacks while I'm still processing the initial event.
- In addition the host still requires a Quickdraw environment which isn't really available anymore.
- If display pixels would support some additional bit depths, it would significantly reduce the complexity of plugin GUIs and the number of internal plugin buffers. It would also overcome the problem of displaying 32bit linear data...!
On the Apple OS side:
- I have implemented a GUI in Cocoa which works fine (don't tell Chris 😉 ). However, there is a problem with inter window communication.
In general I also believe that the FilterRecord struct is getting a bit aged and overcrowded. A newly designed and more robust interface might be welcome. Splitting up certain functions between new types of filter plugins perhaps...
Oh, and did I mention re-entrancy yet?