Handle debug-events