Hello,
You can use the SQL queries debug:
SQL queries debugging for queries which are executed by Kentico. You can use CMS.SettingsProvider.SqlHelperClass namespace to execute custom queries (see the API Reference for more details).
You can register queries and stored procedures in Site manager -> Development -> Document types -> edit Root -> Queries -> add a new one. It doesn't need to be related to document types, it will be only stored there.
You can also use the standard ASP.NET tools since Kentico is a standard ASP.NET application.
Best regards,
Helena Grulichova