Debug statemachine