AspNetDebugDashboard 2.0.0
See the version list below for details.
dotnet add package AspNetDebugDashboard --version 2.0.0
NuGet\Install-Package AspNetDebugDashboard -Version 2.0.0
<PackageReference Include="AspNetDebugDashboard" Version="2.0.0" />
<PackageVersion Include="AspNetDebugDashboard" Version="2.0.0" />
<PackageReference Include="AspNetDebugDashboard" />
paket add AspNetDebugDashboard --version 2.0.0
#r "nuget: AspNetDebugDashboard, 2.0.0"
#:package AspNetDebugDashboard@2.0.0
#addin nuget:?package=AspNetDebugDashboard&version=2.0.0
#tool nuget:?package=AspNetDebugDashboard&version=2.0.0
<p align="center"> <img src="docs/images/banner.png" alt="" width="780"> </p>
ASP.NET Debug Dashboard
Request, SQL query, log, and exception capture for ASP.NET Core, viewable in a dashboard at /_debug. Think Laravel Telescope, but for .NET.
Everything is stored locally in a LiteDB file. The dashboard ships inside the package as a single self-contained page, so there are no CDN dependencies and it works offline.
Install
dotnet add package AspNetDebugDashboard
Or in the project file:
<PackageReference Include="AspNetDebugDashboard" Version="2.0.0" />
Or from the Package Manager Console in Visual Studio:
Install-Package AspNetDebugDashboard
Works on .NET 8, 9, and 10. No other setup files, schemas, or services needed — storage is an embedded LiteDB database created on first run.
Setup
The minimum is two lines:
using AspNetDebugDashboard.Extensions;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDebugDashboard(); // 1. register services
var app = builder.Build();
app.UseDebugDashboard(); // 2. add middleware (no-op outside Development)
app.MapControllers();
app.Run();
Run your app and open /_debug.
Capture EF Core queries
Attach the interceptor when registering your context:
builder.Services.AddDbContext<AppDbContext>((sp, options) =>
{
options.UseSqlServer(connectionString); // any relational provider
options.AddDebugDashboard(sp);
});
Works with SQL Server, PostgreSQL, SQLite, MySQL — anything that goes through EF Core's relational pipeline. (UseInMemoryDatabase produces no SQL, so there's nothing to capture there.)
Write your own log entries
Inject IDebugLogger anywhere:
public class OrderService(IDebugLogger log)
{
public async Task<Order> CreateAsync(CreateOrderRequest req)
{
await log.LogInfoAsync("Creating order", properties: new() { ["customerId"] = req.CustomerId });
// LogWarningAsync, LogErrorAsync, LogSuccessAsync, or LogAsync(message, level)
}
}
Or use the static logger where injection is awkward:
await DebugLogger.InfoAsync("Cache warmed", tag: "startup");
Entries written during a request are attached to it, so the request detail shows the logs and queries it produced.
The dashboard
| Overview | totals, error rate, status/method distribution, slowest requests and queries |
| Performance | req/min, avg, median, P95/P99, error rate, slowest endpoints — last hour |
| Requests | sortable table with duration bars; detail has Summary / Headers / Request / Response / SQL / Logs tabs and a copy-as-cURL button |
| Queries | full SQL with syntax highlighting, parameters, timing; slow queries flagged; an N+1 warning appears when one request runs the same query 3+ times |
| Logs | level, category, structured properties, stack traces |
| Exceptions | type, message, full stack trace, inner exceptions, the route that threw |
Global search (Ctrl+K) covers everything. Tables navigate from the keyboard: j/k rows, Enter open, / filter, Esc close. Queries, logs, and exceptions link back to their parent request.
Configuration
All options, with their defaults:
builder.Services.AddDebugDashboard(options =>
{
options.BasePath = "/_debug"; // dashboard route
options.DatabasePath = "debug-dashboard.db";
options.MaxEntries = 1000; // per entry type, oldest trimmed first
options.LogRequestBodies = true;
options.LogResponseBodies = false;
options.MaxBodySize = 1024 * 1024; // bodies above this are skipped
options.SlowQueryThresholdMs = 1000;
options.ExcludedPaths = new() { "/_debug", "/health" };
options.ExcludedHeaders = new() { "Authorization", "Cookie" };
options.RetentionPeriod = TimeSpan.FromDays(7);
});
Or bind from appsettings.json:
{
"DebugDashboard": {
"MaxEntries": 2000,
"LogResponseBodies": true,
"SlowQueryThresholdMs": 500
}
}
builder.Services.Configure<DebugConfiguration>(builder.Configuration.GetSection("DebugDashboard"));
builder.Services.AddDebugDashboard();
The full reference is in docs/CONFIGURATION.md.
Production
UseDebugDashboard() does nothing unless the environment is Development, so leaving the package referenced in production builds is safe. If you do want it on elsewhere (a staging box, say), opt in explicitly:
app.UseDebugDashboard(forceEnable: true);
If you force-enable it anywhere reachable from the internet, put it behind your own auth. The dashboard itself has none, and captured request bodies can contain anything your users send.
REST API
The dashboard is a client of a plain JSON API you can also call directly:
| Endpoint | What it returns |
|---|---|
GET /_debug/api/stats |
totals and distributions |
GET /_debug/api/requests |
paged requests — supports search, method, statusCode, isSuccessful, minExecutionTime, sortBy, page |
GET /_debug/api/queries |
paged SQL queries — supports search, isSlowQuery, isSuccessful |
GET /_debug/api/logs |
paged logs — supports search, level |
GET /_debug/api/exceptions |
paged exceptions |
GET /_debug/api/performance |
last-hour metrics (P95/P99, error rate, slowest endpoints) |
GET /_debug/api/search?term= |
cross-type search |
GET /_debug/api/export |
everything as a JSON file |
POST /_debug/api/logs |
write a log entry over HTTP |
DELETE /_debug/api/clear |
wipe all captured data |
Full details in docs/API.md.
Try it
The repo ships a sample app with endpoints for generating traffic, slow operations, and test exceptions:
git clone https://github.com/eladser/AspNetDebugDashboard
cd AspNetDebugDashboard
dotnet run --project samples/SampleApp --urls http://localhost:5000
# hit a few endpoints, then open http://localhost:5000/_debug
curl http://localhost:5000/api/products
curl http://localhost:5000/api/products/slow-operation
curl http://localhost:5000/api/products/test-error
How the dashboard is built
The UI is a Vite + React app in dashboard/, compiled to one HTML file with everything inlined and embedded into the assembly. To work on it:
cd dashboard
npm install
npm run dev # proxies /_debug/api to localhost:5000 — run the sample app alongside
npm run build # writes src/AspNetDebugDashboard/wwwroot/index.html
See CONTRIBUTING.md for the full dev loop.
Support
If this tool saves you some debugging time, you can buy me a coffee.
License
MIT. See LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- LiteDB (>= 5.0.21)
- Microsoft.EntityFrameworkCore (>= 10.0.9)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.9)
-
net8.0
- LiteDB (>= 5.0.21)
- Microsoft.EntityFrameworkCore (>= 8.0.28)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.28)
-
net9.0
- LiteDB (>= 5.0.21)
- Microsoft.EntityFrameworkCore (>= 9.0.17)
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.17)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
2.0.0 rebuilds the dashboard UI from scratch: a self-contained React app embedded in the package (no CDN dependencies, works offline) with request/query/log/exception tables, detail views, search, filtering, and live refresh. Adds net9.0 and net10.0 targets. The dashboard route, API endpoints, and public extension methods are unchanged.