NJL64 Debugging should result in having some hypothesis on what might be wrong with the code. It shouldn't result in being stumped 😃
Write down your current "working hypothesis" on what's wrong with this code, and debug more on the basis of this hypothesis. Do this over and over, adjusting your hypothesis as you go, until the bug is finally found and resolved.
This is fundamental for building any piece of software, big or small. So make your priority to learn to do it on your own.
I'd be interested to hear your current hypothesis on what's wrong with that code.