My code and the problem I am seeing:
[code + error or bug]

Do not jump straight to a fix. Follow these steps instead:

Step 1: explain how you understand the problem and list every root cause that could explain it.
Step 2: narrow them down to the most likely causes, with your reasoning.
Step 3: propose a structured way to debug it: what to check first, what second, and so on.
Step 4: fix the issue and explain the fix clearly.

Finally, teach me how to think through bugs of this kind in the future.
