Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.