Keyboard Maestro includes a built-in macro debugger which you can turn on by choosing the Status Menu ➤ Start Debugging menu or by using one of the Debugger actions. This will display the Macro Debugger window.
Once debugging, you can control whether new macros start paused or start running.
The macro debugger shows all running macros, and what action they are currently executing (including showing nested actions).
Using the buttons on the left, you can:
The buttons on the right let you:
The button at the top right toggles displaying variables. The debugger will show the ten most recently modified (by this macro instance) variables and a summary of their values. If you want to show more information, you can use the Log action to log details to the Engine.log file, or use the Display Text action to display information in a window.
To debug a macro:
All the debugger actions can also be done via the Debugger actions.
Keep in mind that once a macro has started executing, the engine has taken a copy of the macro to execute, so any changes you make in the editor will not affect the execution of the macro (although any changes you make to a sub macro that has not yet started executing would apply).
Also keep in mind that macros can often be time sensitive, so if you find your macro runs fine when stepped through in the debugger, but not when run normally, the issue is quite possibly that the macro is executing actions like click actions before the system has caught up and the screen is stable. Add an appropriate Pause action if that is the case.
If you close the debugger window, the paused macros will resume their normal operation.