Xdebug provides all the basic debugging capabilities: breakpoints, stack traces, variable watches, and so on. It also makes special functions available to the executing program. For example, you can display the amount of memory a PHP application is using by calling Xdebug's xdebug_memory_usage() function. Finally, Xdebug can be configured to track an HTTP session. Appending an XDEBUG_SESSION_START parameter to the URL of an HTTP request will cause Xdebug to emit a cookie to the browser, thus enabling a single debug session to span multiple HTTP transactions.
Debugging SQL is different from debugging a procedural language. Testing the correctness of a query is often done simply by building and executing the query in ad hoc fashion -- that is, typing the query into an SQL management console and verifying the results. Many PHP IDEs provide database tools for this very reason. For example, the Database Development Toolkit in Eclipse (and Zend Studio) includes ad hoc query execution, as well as execution statistics. With the proper plug-in (dependent on the database engine), you can also display query plan information.