---
title: Debugging SQL queries with Glimpse on MVC sites
related:
  - https://docs.kentico.com/13/developing-websites/troubleshooting-websites/debugging.md
  - https://docs.kentico.com/13/developing-websites/troubleshooting-websites/debugging.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

> **Note:** Kentico Xperience Refresh 1 introduces [SQL debugging](https://docs.kentico.com/13/developing-websites/troubleshooting-websites/debugging.md) functionality integrated directly into the administration interface. The **Kentico.Xperience.Glimpse** package remains available and you can use it if you wish to see executed queries as they occur on the live site. However, we recommend using the built-in SQL debugging functionality, which does not require additional configuration.

During the development of your websites, you may want to see which SQL queries run when loading specific pages. For ASP.NET MVC 5 applications, you can debug the executed SQL queries using the **Kentico.Xperience.Glimpse** [integration package](https://docs.kentico.com/13/developing-websites/starting-with-mvc-development/installing-xperience-integration-packages.md).

The Glimpse integration package is NOT supported for applications using the ASP.NET Core [development model](https://docs.kentico.com/13/developing-websites/xperience-development-models.md).

## Setting up Glimpse in the MVC 5 application

To use Glimpse in your MVC 5 application, install the related NuGet packages and enable Glimpse:

1. Install the required NuGet [integration packages](https://docs.kentico.com/13/developing-websites/starting-with-mvc-development/installing-xperience-integration-packages.md):
   - _Kentico.Xperience.Glimpse_ – adds the _Kentico SQL_ tab, which provides insight into the SQL operations that the related Xperience instance is performing.
   - _Glimpse.Mvc5_ – adds the following tabs, which provide diagnostics specific to the ASP.NET MVC 5 framework:
     - _Execution_
     - _Model Binding_
     - _Metadata_
     - _Views_
2. Run the MVC application and navigate to _/glimpse.axd_.
3. Click **Turn Glimpse On**.

The Glimpse extension is now enabled and you can use its web diagnostics features.

By default, the _Kentico SQL_ tab in Glimpse does not show any information. You need to enable SQL debugging in the Xperience settings to populate the tab:

1. Open the Xperience **Settings** application.
2. Navigate to **System** -> **Debug**.
3. In the **SQL queries** section, select the **Enable SQL query debug** option.
4. Click **Save**.

At this point the Kentico SQL tab in Glimpse shows the information about executed SQL queries. You can find the following information for each query:

- SQL code of the query.
- Size of the data that was **Sent** and **Received**.
- The **Duration** of the query execution.
- The full **Stack trace** of each query.

![Debugging SQL queries with Glimpse](https://docs.kentico.com/docsassets/13/debugging-sql-queries-with-glimpse-on-mvc-sites/Kentico_SQL_debug_in_Glimpse.png "Debugging SQL queries with Glimpse")
