How to enable UTE logs?
Unit test explorer has bunch of processes (client-process, discovery/datacollection process, execution process) and depending upon what you want to debug, you should select the appropriate process and enable its logs. Once you have enabled the logs, the logs will get generated in %Temp% folder with log file names of the format <ProcessName>.TpTrace like vstest.executionengine.TpTrace.log Here are the steps to enable log for a given process: -
- Open the configuration file of the process like (vstest.executionengine.exe.config)
- Change the TpTraceLevel from 0 to 4.
<add name="TpTraceLevel" value="0" />
Note: - This xml does not exist in devenv.exe.config, so if you want to enable logs of visual studio, you should copy the above xml with TpTraceLevel as 4 and put it in devenv.exe.config.
- Save the configuration file.
- Restart your client so that the configuration file gets applied.
- Do a discovery or a test run and now you will observe the logs in %temp% folder.
- Discovery/datacollection happens in vstest.discoveryengine* process and execution happens in vstest.executionengine* process when done from VS (out of process mode). For command-line by default discovery/execution happens in the same process (vstest.console.exe)
- The UTE binaries (like vstest.console.exe, vstest.executionengine*.exe… ) are installed typically in %VSInstallDir%\Common7\IDE\CommonExtensions\Microsoft\TestWindow folder.