Or you can use a better php editor like zend studio or eclipse with php plugins that has a internal debugger. And you can even see what's going on when you re writing.