This article describes how to debug Folder Actions handlers using Script Debugger 8.
I’ve had a couple of support emails recently on this topic so I’m documenting it here for everyone.
Background
Before macOS Big Sur, Script Debugger was able to debug Folder Actions scripts as they ran using a feature called External Debugging. Security changes introduced in macOS Big Sur rendered the External Debugging feature inoperable. With the release of Script Debugger 8, we removed External Debugging entirely.
Simulation
The alternative is to use Script Debugger’s ability to simulate Folder Actions events and debug your scripts directly within Script Debugger.
Script Debugger’s Execute, Trace, Step Over and Step Info menu commands have submenus where you can select an AppleEvent to simulate. In the case of Folder Actions scripts, you can use any of the items in the Folder Actions submenu:
This event, as far as I know, has never worked. The documentation for the moving folder window for event handler is marked as Not currently available.
This is why we don’t offer a debugging facility for this event. If you wanted to, you could define a handler for this event and then create an on run test rig to invoke the handler with known inputs.