Getting a WordPress Debug Strategy

You have several tools at your disposal when working with native WordPress debugging.

PHP DebuggingWP_DEBUG is the native WordPress PHP constant for debugging WordPress errors. It sets PHP’s error reporting to to E_ALL for warnings when deprecated functions are used and if none are found it sets it to E_ALL ^ E_NOTICE ^ E_USER_NOTICE.

So most of the time setting define( 'WP_DEBUG', true ); is enough.

Ref: http://php.net/manual/en/errorfunc.configuration.php

Database Query
To debug database queries you need to set define('SAVEQUERIES', true);
This is a very handy tool that will benchmark and perform some analysis in your $wpdb query.

Javascript
To debug any javascript you can turn on define('SCRIPT_DEBUG', true);

That is pretty much it in terms of WordPress itself, plugins like the Debug Bar simply make it easy to read the results, since debugging output can be quite messy. For example look at the SAVEQUERIES in the debug bar, it is very easy to read.

There are other plugins that extend the capabilities of debugging because they provide more information and better output, I made a list of some here since this question comes up quite often, http://debugggg.wordpress.com/