- It's an Extension for Visual Studio 2010
- It Displays the Matched Route Data and Data Tokens of All Defined Routes in your web application
- It's a Free Product
What is the Basic Requirement Needed for Run MVC Routing Debugger ?
- Microsoft Visual Studio 2010 Any Edition Except Express Editions
How to Install MVC Routing Debugger ?
Step 1. Open Visual Studio 2010
Step 2. Click Tools ---> Extension Manager
Step 3. Click "Online Gallery" Button
Step 4. Type "ASP.NET MVC Routing" inside the Search box
Step 5. Click "Download" Button
Step 6. Click "Install" Button
Step 7. Click "Restart Now" Button for Restart Visual Studio 2010
That's It.You're Done.
How to Use MVC Routing Debugger ?
Step 1. Run Visual Studio 2010
Step 2. Open Your Asp.Net MVC Project
Step 3. Go to Your Action Method Which You Want to Find Route Details
Step 4. Set a Brake Point on it (Debug your Action Method)
Step 5. Run Your Application
Step 6. When It Hits Your Brake Point , Open the "Watch Window"
Step 7. Add a New Watch Row for "System.Web.Routing.RouteTable.Routes"
Step 8. Click on the "Magnifying Glass Icon" at the Right Side of the Value field on the
New Watch Row
Step 9. The "MVC Routing Debugger Visualizer" should be Opened
- You can see the Current URL in the Request Url Field
- Grid of Currently-Defined Routes below that
- Routes that Match the URL are Highlighted
- Route Data and Data Tokens Grids are also Showing on the Right side
This is my Global.asax.cs
public static void RegisterRoutes(RouteCollection
routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default",
// Route name
"{controller}/{action}/{id}",
// URL with parameters
new {
controller ="Home",action ="Index",id =UrlParameter.Optional
}//defaults
);
}
How to Change the Value in Request Url ?
That's It.You're Done.
Do You need to Know More Details ?
- MVC Routing Debugger Visualizer Home
Conclusion
- It's a very simple Tool for Use and Configure
- It's running only on Debugger mode
- When we're having route related issues, this is a tool for debug those issues
- So Try This and Enjoy it
I hope this helps to You.Comments and feedback greatly appreciated.
Happy Coding
Tools for Visual Studio 2010
You are an expert on this , You are fixing a issue most developers facing with IDE , s and working with GUI . Thanks alot
ReplyDeleteHi Hasitha,
DeleteYou're most welcome.
Glad to hear that it helped.
Hello Sampath,
ReplyDeleteI can pass through from step 1 to step 6. But Step 7 to step 9 I am not able execute it.
When I am doing step 7 I am getting below mentioned values.
Column:
Name: System.Web.Routing.RouteTable.Routes
Value: Count = 1
Type: System.Web.Routing.RouteCollection
So I failed from step 7 to step 9. Please help me to resolve this.
Thanks in advance.
Hello Sampath,
DeleteNow I am able pass through from step 1 to step 9.
Nice article.
Thanks for your explorations and sharing :)
Regards,
Mukesh Selvaraj
i have the same Problem... it would be nice if you tell what was your solution!!
Deletei've found a Description here: http://toreaurstad.blogspot.de/2011/12/blog-post.html
DeleteNOW it Works...
Hi Mukesh & Howard,
DeleteThanks for the sharing different experience with us.
I will check this thing and will update my post accordingly.