WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is your preferred method of debugging Wordpress Applications when writing custom behind-the-scenes SQL calls, etc. ?

Coming from a Rails background, I usually tail a log file that displays not only all the processes and views that are being seperately loaded into a template, but if there is an error, it will pin point the exact location of the error, with a suggested idea of what went wrong. I noticed that in WordPress, you can set up a debug.log file but it only shows a very barebones version of this, and rarely points to what actually is failing.

Any recommends?

share|improve this question
up vote 2 down vote accepted

Turn on define( 'WP_DEBUG', true ); and define( 'SAVEQUERIES', true ); .

I prefer the format of the debug bar, http://wordpress.org/extend/plugins/debug-bar/ , which can be combined with the console, http://wordpress.org/extend/plugins/debug-bar-console/ .

This script is great for profiling, Best Collection of Code for your functions.php file

There are some other plugins that might help, like Debug Queries, but you probably going to have to use a debugger like xdebug to get more fine grained details.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.