xdebug is awesome because it allows you to go through code checking on variables as you go.
It also allows you to perform profiling (dumps callgrind files to the directory of your choice, describing in great detail what happened, how many times, when and how much time has passed)
To take full advantage of xdebug, you need a good IDE, I suggest netbeans , but you can use any of the main packages now.
source share