# Debug an Issue # Step-by-step debugging workflow # Understand the problem session "Read the error message and stack trace. Identify which file and function is causing the issue." # Gather context session "Read the relevant source files and understand the code flow that leads to the error." # Form hypothesis session "Based on your investigation, form a hypothesis about what's causing the bug. List 2-3 possible root causes." # Test hypothesis session "Write a test case that reproduces the bug. This will help verify the fix later." # Implement fix session "Implement a fix for the most likely root cause. Explain your changes." # Verify fix session "Run the test suite to verify the fix works and doesn't break anything else."