ecently I had to do some debugging of a WCF service. I used trace logs for this, but the output format of the tracelogs is a wall-of-text xml file.

Luckily, Microsoft has created a viewer that facilities working with these tracelog xml files, “ServiceTraceViewer”.

For Windows 10, the viewer is installed along with the windows SDK, which is available at this URL:

Note that to add trace logs to a WCF service all you need to do is add some entries to the web.config file.

    <!-- log TRACE messages-->
      <add name="lcars_listener" type="System.Diagnostics.TextWriterTraceListener" initializeData="e:\logs\lcars.services.configuration.log" /> 
       <remove name="Default" />  


  <!-- log WCF traffic/messages -->
      <source name="System.ServiceModel"   
              switchValue="Information, ActivityTracing"  
          <add name="lcars_listener" /> 
          <remove name="Default"/>

    <add name="lcars_listener"