Nope. Unfortunately there is not. This is a limitation of PHP's PDO.
However you can still find the final query.
I accomplish this by enabling MySQL's query logging in /etc/mysql/my.cnf
(The location of your mysql configuration file may be different).
You want to enable the general_log
inside of my.cnf
and then restart MySQL. Then in /var/log/mysql.log
, you'll see each query made to the database.
Only do this in a development server, not in production.