X

Subscribe To Our Mailing List

P.S I will never spam you...100% GUARANTEED!

Sunday, June 15, 2014

MVC Route Debugger – GLIMPSE

As we all know MVC pattern purely relies on Routing. In ASP.NET MVC routing, you can define URL patterns that map to request-handler files, but that do not necessarily include the names of those files in the URL. In addition, you can include placeholders in a URL pattern so that variable data can be passed to the request handler without requiring a query string. So here i am not elaborating much on MVC pattern and Routing mechanism. So this post is written mainly concentrating on the mvc routing debugger.
I know there are lot of people loving to code in MVC. But there are lot of people like me who struggled a lot in the MVC Routing, who are not able to find which method is being called on client request.
To overcome this there are lots of tools came in the market to ease the debugging the routing part. So here i am going to explain the debugger called “Glimpse”, which is used by majority of the people to debug their routing needs.
So what is Glimpse ?
Glimpse is like the FireBug client side debugger, except it’s implemented in JavaScript on the client side with hooks in to ASP.NET on the Server Side.
How i can use it in my Visual Studio Project ?
So here i am going to explain you the steps to use “Glimpse” in your project -
Open your Visual Studio -> Click on New Project -> Click on Web -> Select ASP.NET MVC4 Web Application

MVC Route Debugger – GLIMPSE















Click on Tools -> Nuget Package Manager -> Package Manager Console -> Install-Package Glimpse


MVC Route Debugger – GLIMPSE



and Install Glimpse for MVC4 using command -> Install-Package Glimpse.MVC4
You can observe the change in your web.config, it adds the few lines which are relevant to glimpse.

Now, I will run my app. I can turn Glimpse on like visiting http://localhost:portname//glimpse.axd and click on button “Turn Glimpse On”

You can see the below toolbar at the bottom of the screen -
MVC Route Debugger – GLIMPSE





In the above screenshot you can check the request details, method called in server, time taken to get the response etc. which i feel is boon to all developers to track the code and debug. 
This article is just for overview of it you can check more on - http://www.getglimpse.com



2 comments:

Comments Section