Debugging can be a piece of shit sometimes. Here are some tips that may help you with debugging your project.
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.
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.
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.
I hope I could help you to some degree in this article. See you next time!