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?

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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