Debugging can be a piece of shit sometimes. Here are some tips that may help you with debugging your project.
Comment
Comments are very important in programming. You can leave them anywhere to explain the code or leave notes. I usually don't comment anything, because it's just a small project that no one will use. If you want to extend it, or it blows up, please, for the love of God, go back and comment everything. When you are getting a bug report, it can be much easier to pinpoint what's up with comments.
Log
Logging is a possibility in (if not all) most programming languages. With logging, you can take note what users input in your service, and bugs can be easier to understand.
Visualize your Program Flow
If you use both techniques above, a program flow can be a cherry on the cake. You can look up the user input in the log, locate what the data goes through with the program flow, and see what can be an issue with reading the comments.
Epilogue
I hope I could help you to some degree in this article. See you next time!
Discussion
I recognize three stages of commenting throughout the career:
That is true, but thinking as a beginner, I'd prefer to comment everything that's not
console.log
simple, just in case I'd forget what it is.