Follow a systematic approach:
Reproduce the bug consistently
Isolate the problem area
Form a hypothesis
Test your hypothesis
Fix and verify
Don't randomly change code hoping it works. Understand the bug first.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
Systematic bug hunting
Follow a systematic approach:
Reproduce the bug consistently
Isolate the problem area
Form a hypothesis
Test your hypothesis
Fix and verify
Don't randomly change code hoping it works. Understand the bug first.