While debugging SQL queries with:
< ?php echo $this->element('sql_dump'); ?>
(in your layout) or DebugKit works great, you have to `render` for it to work. In this particular case that was a problem because I had an `exit;` statement in the middle of my controller to prevent redirection.
The following statement was my rescue:
$log = $this->Model->getDataSource()->getLog(false, false); debug($log);
I leaves you a nice SQL log in array format!
PS: make sure to replace Model with an actual model name…