Skip to content

Show current route info and all routes in an ASP.NET Core application

License

Notifications You must be signed in to change notification settings

sw0/AspNetCore-RouteDebuggerMiddleware

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASP.NET Core RouteDebugger Middleware

.NET Core

Show current route info and all routes in an ASP.NET Core application

Background

Inspired by .NET Framework version of the origional RouteDebugger: https://haacked.com/archive/2008/03/13/url-routing-debugger.aspx/

We need something similar in .NET Core, with a few differences:

  • Add route info in response header instead of append them in HTML
  • Use JSON over HTML table for better tooling support
  • Use Middleware to make it .NET Corelish

Usage

Install From NuGet

dotnet add package Edi.RouteDebugger

Adding the Middleware

Recommend use in development environment ONLY

if (env.IsDevelopment())
{
    app.UseRouteDebugger();
}

View Current Route

  • Open any page in your application
  • View response header

View All Routes

  • Access /route-debugger from browser or postman

About

Show current route info and all routes in an ASP.NET Core application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 55.0%
  • HTML 31.7%
  • CSS 11.4%
  • JavaScript 1.9%