Enable logging in your configuration. You can e.g. use CWebLogRoute to get all log messages appended to every page (don't use on live site, of course!!)
<?php
array(
'components'=>array(
// ... other config
'log' => array(
array(
'class'=>'CWebLogRoute',
),
),
),
// ... other config
)
Could you please create a ticket for this? I will add some trace statements in AR so that SQLs can be more easily associated with the corresponding AR commands.