src/Component.php
public function debug($query, $values = array())
    {
        $query = (is_array($query)) ? trim(implode("\n", $query)) : trim($query);
        if (!is_array($values)) {
            $values = (!empty($values)) ? array($values) : array();
        }
        foreach ($values as $string) {
            if (false !== $replace = strpos($query, '?')) {
                $query = substr_replace($query, $this->dbEscape($string), $replace, 1);
            }
        }

        return $query;
    }
public function debug($query, $values = array())
    {
        $query = (is_array($query)) ? trim(implode("\n", $query)) : trim($query);
        if (!is_array($values)) {
            $values = (!empty($values)) ? array($values) : array();
        }
        foreach ($values as $string) {
            if (false !== $replace = strpos($query, '?')) {
                $query = substr_replace($query, $this->dbEscape($string), $replace, 1);
            }
        }

        return $query;
    }
Returns a **$query** with it's **$values** in place so that you can stare at it, and try to figure out what is going on.

@param string|array $query  An SQL statement.
@param mixed        $values The query parameters.

@return string