Is it possible to see database queries in Rider while debugging my application?


We have a Web API project using .NET 6, using a MySQL database via EF Core. I'm trying to diagnose some performance issues. Is there any way to see what queries the application is making to the database, and how long they're taking? I know I can log the queries, open a query window, and copy in the logged queries myself to see how they perform, but it would be much more convenient when debugging to see what the application itself is doing with the database in real time.

I am able to do something analogous with endpoints using the Application Insights Debug Log viewer plugin - this shows me API requests in real time while I'm debugging, with the details of each request and the time taken to respond. If I could do this for the underlying database queries, that would be perfect.

NB I'm fairly new to Rider so may be missing something basic. I've looked through the Database tools and SQL documentation for Rider, but didn't find what I'm looking for.

Comment actions Permalink

Yes, using logging of EF Core is what you need now.


Please sign in to leave a comment.