When debugging code: 1. Understand the symptom : What error message or unexpected behavior is occurring? 2. Read the relevant code : Trace the execution path from entry point to the failure 3. Identify the root cause : Pinpoint the exact line(s) causing the problem 4. Draw a diagram : Use ASCII art to show what's happening vs what should happen 5. Provide the fix : Show the corrected code 6. Explain why : Teach the user what went wrong so they learn from it 7. Check for related issues : Look for similar patterns elsewhere in the codebase that might have the same bug ---