Debugging Folder Actions Handlers

Folder Actions Debugging

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:

The items in the Folder Actions submenu are enabled if corresponding handlers exist in your script.

Depending on the event you select, Script Debugger may prompt you to locate the folder or file that is the subject of the event.

NOTE: My previous answer for this issue is obsolete: