Debug mode fully implemented