How to enable logs for MTM?

Here are the steps you should perform to enable MTM logs: -

  • Go to the MTM installation directory (typically it is something like C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE\)
  • Open the MTM configuration file (mtm.exe.config) from an administrative prompt.
  • Change the trace levels to 4/verbose and add a trace listener.

<!-- Trace settings for MTM -->
<!-- Change the value to change the level of tracing you want.
You must use integral values for "value".
0 ==> off,
1 ==> error,
2 ==> warn,
3 ==> info,
4 ==> verbose.
Note that each value is inclusive of the last.
<add name="UITestTraceLevel" value="0" />
<add name="EqtTraceLevel" value="4" />
<add name="TestManagement" value="4" />
<add name="TeamBuild" value="4" />
<add name="TeamFoundationSoapProxy" value="verbose" />
<trace autoflush="true">


<add name="myListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="C:\temp\MTM_Trace.log" />

< /listeners>
< /system.diagnostics>

  • Restart MTM and now you will observe a log file in named MTM_Trace.log in c:\temp folder.

Comments (6)
  1. Vivek Bansod says:


    What kind of logs it will generate? How it is different from diagnostic setting in MTM?



  2. Vivek,

    This will generate a txt file containing all the .net traces that we have put in our code. Which diagnostic setting in MTM are you talking about?


    Aseem Bansal

  3. Harry Zheng says:

    Thanks for the post. I got the trace working which helped me investigating an MTM hanging issue.

  4. chandrasekhar melam says:

    Hi Banasal,

    Thanks for your post.

    I'm executing the automation test cases. In MTM 2010 i can able to see but in MTM 2013 i cant. I need this file for debugging my automation test cases. So how i can see this? Please let me know.

    Thanks for Advance

  5. Manoj Bableshwar says:

    Hi   Chandrasekhar,

    The trx attachment file must be available in MTM 2013 as well. We will need to debug why this is not showing up. Can you share the following details?

    – You are connecting to the same TFS server using MTM 2010 and MTM 2013, or correcting to different TFS server?

    – What is the version of the TFS server?

    Mail me the above information at manoj.bableshwar at Microsoft dot com, and we will look into the issue. Once resolved, we can post the response here for others as well.



  6. Angela Dugan says:

    Just an FYI, I copied right from your code and MTM would not launch. There is an extra space in the closing tag for listeners:

    < /listeners> –> </listeners>

Comments are closed.

Skip to main content