xdebug is an immensely powerful tool for exploring what your code really does.
You can get a long way using print_r but ultimately this always requires that you predict the path your code will take - and the tricky bit about debugging is you need it when your predications have gone wrong.
It's generally pretty easy to set up
If it doesn't work at first restart Eclipse
Check that you have a browser configured in Eclipse
Not all settings seem to be picked up immediately