Whenever you come across a bug, write a test that will reproduce that bug first. Before you start writing one line of code to fix it make sure there is this failing test which will capture the scenario. Turnaround time is much faster. You can see immediately what your code is doing. The "fix-build-start app-verify fix" is just a "run test" now. Much much faster. No chance of the bug reappearing. Going Test First tends to make your code better(generalizing I know). Been bitten by this more than once.