Debug Debug a reported issue using a structured reproduction-then-fix approach. Phase 1: Reproduction & Root Cause Analysis 1. Investigate — Analyze the bug report for key symptoms and error messages 2. Trace — Search the codebase for error occurrence patterns, trace from symptom to source 3. Root cause — Identify the root cause through data flow analysis and edge case checking 4. Reproduce — Create a minimal failing test case that reproduces the exact error 5. Document — Clearly document the root cause and reproduction steps Phase 2: Fix Implementation 1. Plan — Analyze the optimal fix appro…