I deployed a Symfony2 Console Command that runs Doctrine2 queries. I am now getting problems with the queries (when flushing the EntityManager) and would like to see the queries for debugging. So the question is simple: is there a way to debug queries executed in a console command giving similar results than the Symfony2 toolbar? Ideally, I would like to be able to see the queries in the console as well (since I am having problems only in the production server and have disabled access to the dev environment from the front controller).
Thank you!