I have a unit test suite using mstest that I can run fine frome inside visual studio, but when my deploy scripts tries to run the tests using a command line call to mstest it will freeze during a test half the time. It is likely a problem in the test, but without being able to reproduce the issue inside a debugger I have been unable to find the issue.
So far I have been unable to attach the mstest process to be able to debug the issue, as when I attach and pause I see nothing in visual studio (no threads listed, no known code). Is there something odd about how it uses appdomains that prevents easily attaching to it? Any other good ways to try and troubleshoot, is it even possible to do the equivalent of Console WriteLine from inside the test so that mstest will display it in the console window its running in?
Trace.WriteLine, and it will appear in the generated .trx, but I'm not sure it writes the report until the very end...