How to get Debug output from unit tests in TFS 2015
<p>When running unit tests locally in Visual Studio 2015, I can click on the Output hyperlink in the test results and gain access to all the Debug Trace output (as Standard Output) on the test output page.</p>

<p><a href="https://i.stack.imgur.com/AhwYt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AhwYt.png" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/8VLjz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8VLjz.png" alt="Sample Test Output"></a></p>

<p>However when using a build agent to build and test, I can't find any way to gain access to this output information. I've dug through every screen I can think of and nothing. All it shows is the Assert exception message and the stack trace.</p>

<p><a href="https://i.stack.imgur.com/EFZDR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EFZDR.png" alt="enter image description here"></a></p>

<p>Even if I download the .trx file it doesn't include the Console Output section. </p>

<p><a href="https://i.stack.imgur.com/rHcZN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rHcZN.png" alt="enter image description here"></a></p>

<p>Is there any way to get this output from a test run performed by an agent?</p>

<p>Also, some of my tests write additional information to the TestResults folder. The contents of this folder also appears to be excluded from the stored test information. Is there any way to get that as well?</p>

<p>The only other thing I can think of would be to have my tests write all their debug information to files then copy those to another folder as a build step. Seems kind of kludgy. If I remember correctly, the "old" TFS build process would save all this information automatically and it was available looking at test runs in Visual Studio.</p>