Typo3 8: debug queries

Seems like this has changed in the newest typo3 version, so I created a static function in my DebugService: public static function debugQuery($query){ $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(‘TYPO3\\CMS\\Extbase\\Object\\ObjectManager’); $queryParser = $objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser::class); \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($queryParser->convertQueryToDoctrineQueryBuilder($query)->getSQL()); \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($queryParser->convertQueryToDoctrineQueryBuilder($query)->getParameters()); }