In order to debug my code I would like to see the explicit sql query that is executed.
I create the query with createQueryBuilder, and the most explicit thi
createQueryBuilder
You can access the parameters used by the placeholders using $query->getParameters(), so you could debug your query using:
$query->getParameters()
$query = $qb->getQuery(); print_r(array( 'sql' => $query->getSQL(), 'parameters' => $query->getParameters(), ));