Add ability to debug queries.