Is there a log of SQL queries?

I’m building a test for a model method and it is failing yet works fine in the main code.

Stepping through with xdebug has issues; the result set is just filled with an infinite number of empty strings all called ‘CLASSNAME’. This is often the case when I step through a test.

I can’t use the normal method of viewing the final SQL query by printing the log to the screen - by setting up CWebLogRoute in the config, as it is a test and is not associated with a web page.

I’ve tried commenting out ‘levels’ for CFileLogRoute, so that it is set up the same as cWebLogRoute, but this does not result in the SQL queries being printed in the log file. They are saved to the file if I make this change in the main config and a normal page is called. The config is in the correct file - test.php

I’m stumped. Any suggestions?

No problem, I found the solution here