How To Debug Programming Errors? Tips For Beginner Software Developers

Photo of a bug on a computer screen in black and white

Whenever you face a programming error, I suggest the following and moving onto next, if error is not resolved:
  1. Read the error message, line number and understand what it says and do some debugging. 
  2. 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.
  3. If not, take help from a willing colleague or search on stackoverflow.com for similar errors.
  4. 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.
All this while, kindly keep in mind that unless you are paying someone for support, you cannot expect others to do your labor. Be active to show your desire to get the problem solved as their courtesy and not your right.

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 

Comments