Edit file vendor/magento/framework/DB/Statement/Pdo/Mysql.php
return $this->tryExecute(function () use ($params) {
$writer = new \Zend_Log_Writer_Stream(BP . '/var/log/debugSql.log');
$logger = new \Zend_Log();
$logger->addWriter($writer);
$logger->debug($this->_stmt->queryString);
$logger->debug(json_encode($params));
$logger->debug('================');
return $params !== null ? $this->_stmt->execute($params) : $this->_stmt->execute();
});