diagnose bug