Blog

Share this blog : twitter

Aug 7

Written by: IOTAP ::-- DotNet Team
8/7/2008 7:12 PM 

This blog explains about LINQ to SQL Debug Visualizer

LINQ (Language Integrated Query) is a new feature in .Net 3.5 defines a set of query that can be used to query, project and filter data in arrays, enumerable classes, XML, relational database and third party data sources. LINQ to SQL is Visual Studio `2008 feature for modeling relational database through .Net.

Though LINQ to SQL hides the complexity of database query from programmers sometimes I would be useful to see what query is being passed to the data source. Debug Visualizer for LINQ enables to view the raw SQL query that is being passed by the LINQ expression.

Before Installing Debug Visualizer:

When you hit a debug point and hover over a LINQ expression you can see only the query as shown in the figure below

 

After Installing Debug Visualizer:

When you hit a debug point and hover over a LINQ expression a small magnifying glass will appear near the expression

 

Clicking the magnifying glass will open the LINQ to SQL debug visualizer window as shown below

 

The window shows the LINQ expression used and the SQL query that will be passed to the data source. We can also change the query as we want and check the output by clicking “Execute” button.

If we check “Original Query” check box original query will be reverted.

LINQ to SQL debug visualizer can be downloaded from here

 

 

Steps to install SQL debug visualizer

1)    Shutdown all running instances of Visual Studio 2008

2)    Copy “SqlServerQueryVisualizer.dll” from downloaded folder’s bin/debug folder

Paste that dll to C:\Program Files\Microsoft Visual Studio 9.0\Common7\Packages\Debugger\Visualizers.

 

Posted By,
Praveena T N

 

Tags:

1 comment(s) so far...

Re: LINQ to SQL Debug Visualizer

Hi,
You have used "Linq to SQL class" and connected to MS SQL server. So Linq to SQL debug visualizer works fine. In case you have other databases like MS Access, Oracle, DB2, MySQL, etc. you must be using ADO.NET Entity data model class in your solution. In such situation you will miss this debug visualizer. In that case you can find an equivalent which can visualizer your any database/datasource (including MS SQL) query with a free tool at visualstudiogallery.msdn.microsoft.com/en-us/99468ece-689b-481c-868c-19e00e0a4e69. Make sure to post your comment and rate this free tool.
Good Luck
RV

By Venkat on   2/11/2010 1:20 PM

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment   Cancel 


 
 
 

IOTAP is an IT Consulting and Software Services Company with global delivery centers in Mumbai and Chennai, India. We are a Microsoft Gold Certified Partner and use products and technologies like Dynamics CRM, SharePoint, Silverlight, and the .Net platform to create solutions that help our customers connect, communicate and collaborate effectively