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.
<system.diagnostics>
<switches>
<!-- 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" />
</switches>
<trace autoflush="true">
<listeners>
<add name="myListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="C:\temp\MTM_Trace.log" />
< /listeners> </trace>
< /system.diagnostics>
- Restart MTM and now you will observe a log file in named MTM_Trace.log in c:\temp folder.
Comments
- Anonymous
September 30, 2013
Hi,What kind of logs it will generate? How it is different from diagnostic setting in MTM?Thanks,Vivek - Anonymous
October 05, 2013
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?RegardsAseem Bansal - Anonymous
December 10, 2014
Thanks for the post. I got the trace working which helped me investigating an MTM hanging issue. - Anonymous
July 21, 2015
The comment has been removed - Anonymous
July 21, 2015
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. Thanks, Manoj
- Anonymous
February 10, 2016
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>