Share via


TFS Client Tracing

[Updated for Visual Studio 2010]

Team Foundation client tracing is useful for viewing what is sent between the TFS client and server.  Instructions on how to turn this on for Visual Studio 2010 are as follows:

Visual Studio

  1. Shut down Visual Studio

  2. Using Windows Explorer navigate to the following directory:
    C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE
    (replace c: with appropriate drive)

  3. Make a backup copy of devenv.exe.config

  4. Edit devenv.exe.config by adding the following before the last </configuration> :

    <system.diagnostics>
      <switches>
        <add name="TeamFoundationSoapProxy" value="4" />
        <add name="VersionControl" value="4" />
      </switches>
      <trace autoflush="true" indentsize="3">
        <listeners>
          <add name="myListener"
       type="Microsoft.TeamFoundation.TeamFoundationTextWriterTraceListener,Microsoft.TeamFoundation.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
           initializeData="c:\tf.log" />
          <add name="perfListener" type="Microsoft.TeamFoundation.Client.PerfTraceListener,Microsoft.TeamFoundation.Client, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
                   />
        </listeners>
      </trace>
    </system.diagnostics>

  5. Trace data will be written to "c:\tf.log" (bold above).  Change this file name if you prefer

  6. Save the file

  7. Start Visual Studio

  8. Run steps you are interested in tracing

  9. Open c:\tfs-tracefile.log or whatever file you specified in step 5

  10. This writes alot of data, so you will want to restore to the original setting when finished by copying the original file back or commenting out the lines in step 4 by surrounding the lines with <!-- and --> .

 

 TF Command Line

You can trace commandline traffice between tf.exe and the TFS server by doing the save as above except to tf.exe.config

Comments

  • Anonymous
    March 30, 2007
    Cory Foy put up a pretty good tutorial for Autogenerating Tests for Web Services using Visual Studio

  • Anonymous
    April 02, 2007
    Martin Hinshelwood on TFS Admin Tool 1.2 Gotcha. Adam Singer on Can you direct me to Directory Services?...

  • Anonymous
    August 24, 2007
    The comment has been removed

  • Anonymous
    October 30, 2007
    One of the most common issues that i hear from customers is ...unable to check-in the code or when they

  • Anonymous
    October 30, 2007
    One of the most common issues that i hear from customers is ...unable to check-in the code or when they