There seems to often be confusion among developers when they encounter an error in the software or script they are working with. I've compiled a simple process for debugging without wasting lots of time (both yours and others')
- Look at the first error and fix it.
- No really, don't consider all the warnings and other errors unless they can illuminate why that first error occurred. Once there is an error, all bets are off for the rest of the code/script/whatever.
- Seriously though: You tendency is going to be to look for something familiar that think you (or you think a coworker) can fix. You're going to try to fix the easy problem instead of the real problem and waste a bunch of time. Errors and warnings cannot go back in time, so the first one almost certainly was not caused by the later ones.
- After trying to fix the first one, you may discover reliable information about why that error can be ignored. Don't ignore it without a good reason or you are just wasting time.
- Don't fixate for too long. Seek someone else's perspective. Explain the problem to a ruber duck.
- After you've fixed the first error, run the code again and return to step 1.