Have you ever had the, ahem, pleasure of customizing the WordPress query? One of the most useful things in debugging is displaying the last WordPress query.
Let’s say you’re working with taxonomies and/or post types and you’re passing custom parameters around. And then, you want to setup some debugging to see exactly what’s hitting the database.
Anyway, writing code to do this is easy.