Debugging is normally figuring out where your code has errors. A simple way of doing so is by using print().
For example, if there is a function somewhere and it somehow doesn’t work, you can put print() in some places, especially where you are using if statements.