There are 3 categories of bug origin in our code (LSD)
- Logic - Are the steps you used to carry out the operation correct?
- Syntax - Is what you are trying to portay in the code the right way to write it given the programming language being used?
- Data - Is the data passing through in a way that you'd expected? Does the programmatic state of the program align with what you'd expect from your code?
A stack trace is a treasure map of what happened up until things went wrong.