posted by: Ralf Rottmann | posted @ Tuesday, November 27, 2007 10:44 PM | View blog reactions

With the final version of Visual Studio 2008 released recently, a couple of helpful add-ons were made available by Microsoft but are sometimes somewhat hidden. One of these is the Expression Tree Visualizer. Here is a direct download link containing the source code and the compiled version - you will also find the project in your Program Files\Microsoft Visual Studio 9.0\Samples\1033\CSharpSamples.zip\LinqSamples\ExpressionTreeVisualizer folder.

Once you've either downloaded or built the visualizer, shut down all running instances of Visual Studio 2008 and copy ExpressionTreeVisualizer.dll from the LinqSamples\ExpressionTreeVisualizer\ExpressionTreeVisualizer\bin\Debug directory to Program Files\Microsoft Visual Studio 9.0\Common7\Packages\Debugger\Visualizers.

The next time you hover over a Lambda Expression in Debug mode you'll see a little magnification glass:

image

Once you click on it, the Expression Tree Visualizer will nicely display the underlying Expression Tree to you:

image

Cool, or?

(While you're here, you might be interested into the LINQ to SQL Debug Visualizer, too!)

 

comments
No comments posted yet.
post your comment
Title *
Name *
Email
Url
Comment *  
Please add 5 and 7 and type the answer here: