None of the given examples here do fit my needs. When I debug, I want to see clearly what's going on and where is the debug data. Also it has to accommodate with the current styles and not fall behind or get mixed with other text etc.This snippet will give you real debug notices in a flashy table:- complete backtrace of calls on the left with line numbers- arguments content on the right, with the variable name and coloring per variable type

I still find that printing out variable values at problem points in the code is one of the easiest ways for me to debug. If you're interested in knowing the full contents of an object/array/scalar, then use

In this example the function p_r() does only log when the URL parameter d=<nonzero> is set. Reset it by d=0.When the parameter is a valid filename (relative to the script's path) it will be logged to that file rather than to the browser.

If anyone's trying to actually set up the official debugger from Zend (http://www.zend.com/en/products/studio/downloads) with PHP 5.3.8, you'll notice the zip only contains the nts (non-thread-safe) version of the debugger for PHP 5.3.x. Try as you might, it just doesn't seem to work with the tread-safe version of PHP 5.3.8, so for Windows at least I found you'll also need to have the NON-THREAD-SAFE version of PHP installed.

I am a firm believer in the Firephp debugger. It works with Firefox and Firebug to allow you to see the value of any string, array, or object. The best part of it is that it will not interrupt the actual browser output, so you can see the output as it was intended to be seen.

For those who prefer Google's Chome browser, there is something called ChromePHP which is similar, but the way Firephp displays the values in the console is better, plus Firebug itself is an almost priceless development tool.

So, if you're looking for a great debugger, check out Firephp. After you use it you will feel naked if it's not available.

If you don't find a syntax error, you can comment out a block where you assume the error (or put it out of the document by [ctrl] + [X], but keep a copy on your HD for the case, your computer crashes) and check, if the syntax error is still there.If not, it must be anywhere in your commented text; if yes, it must be somewhere else.If you want to locate the error better, do it again with an other and/or smaller piece of code, till you get it.