How To Debug Programming Errors? Tips For Beginner Software Developers
Whenever you face a programming error, I suggest the following and moving onto next, if error is not resolved:
- Read the error message, line number and understand what it says and do some debugging.
- If it does not work, search for the exact error message on Internet, see the solutions, tweak your code and see if it works. Reading the documentation of the technology / framework / plugin you are working with is helpful.
- If not, take help from a willing colleague or search on stackoverflow.com for similar errors.
- If not then, ask a well-written question on StackOverflow or a specific forum if that's available and active, highlighting what you have already tried.
I was inspired to write this post by a similar comment I made on an answer on StackOverflow where a beginner programmer was asking for solution to a common error. I had just guided him through a beginner problem. Instead of giving him fish, I taught him how to fish.
I hope this will help him and others become good programmers and will also do the programming community greater good.
Credits: Bug on computer screen image by Guilherme Tavares