Debugging is the action of going back following the logic of your program and finding the place where it works wrong or doesn't work. It doesn't matter if you use a debugger or just print_r() and echo() in various places of your code. The important thing is to trace backwards. Start from the current place - is there something wrong in it? If yes, go back few lines before the output/result happens. Is it still wrong? If yes, keep going few lines back. If no, then you know where exactly is the wrong piece of code - after this current line and before the line when your latest "is it wrong?" test returned true. I may sound bold, but I'll say that this is the most important skill in programming (and not only) ever: to be able to go back and trace the route of the problem. If you learn to do this, you will be able to solve any solvable problem.
I can't tell you how valuable the above statement has been for me lately as I struggle with my self-taught php skills. Debugging is the key to troubleshooting, but also an important step in learning proper coding practices. It is time consuming but effective.