It is actually quite difficult to make a reliable one depending on your use case, because routes are usually very dynamic. Attribute-based routing will simplify the task, but I assume you are not using it. I found this article that uses reflection , but I have not tried it myself. In addition, this is a simplified approach that will not cover many edge cases.
There are tools like Glimpse that allow you to view most of your routes and debug them (including AJAX!), But even that will have problems with routes that do not conform to the conventions in RouteConfig or have context masks that make them routable through other controllers and etc. As far as I know, they donβt have an API for analysis or
source share