Creating a custom Visual Studio Debugger Visualizer for WCF debugging
Starting from Visual Studio 2005, developers can create some debugger assistant components called Debugger Visualizers to help better inspect the data values during source-code debugging. For example, developers can create some custom visualizers for inspecting picture content when debugging through code that deals with Image objects. In this recipe, we will illustrate how you can leverage the Debugger Visualizer to enhance WCF service code-debugging by creating a custom Debugger Visualizer.
How to do it...
In our sample case, we will create a custom Visual Studio Debugger Visualizer for inspecting service endpoint information of a particular ServiceHost object:
Define the custom Debugger Visualizer type.
First, let’s create a custom Debug Visualizer type. Visual Studio 2010 provides a built-in item template for creating Debug Visualizer (see following screenshot). We can simply create the custom Debugger Visualizer through...