Know your bugs
From Wil Shipley:
I never, ever fix a bug, even from another user, unless I can say with some surety that I can see the circumstances that led to that person writing that bug. It may be as simple as “oh, copy and paste error” or “this person was tired and overlooked this edge case, and that didn’t come up until now.” But if you see a bug and think, “How in the hell did this code ever work?” then you’ve got a lot more work to do (assuming the code did ever work), because you aren’t allowed to move on until you can answer that question.
Understanding your code, and the underlying code of the environment you’re in, is more important than fixing any one bug.