Macro Misbehaves Due to AntiVirus System

KM uses the macOS log system. You can view it here:
GoTo menu Help > Open Logs Folder, or just open this file:
~/Library/Logs/Keyboard Maestro/Engine.log

You may also find this macro helpful:

MACRO: Display Last KM Macro Error