title: vs2010 Debug.WriteLine stops working
body: <p>I have this problem that has been giving me grief for most of the day and then some.<br>
  Basically my Debug.WriteLine works for a bit, and then magically stops giving output.  The debugger is still working because I can put a breakpoint on the line, and it will break, and I can step over the Debug.WriteLine and watch it not output.</p>
  
  <p>Now I have checked everything I can think of.  I have tried things from various posts such as </p>
  
  <p><a href="https://stackoverflow.com/questions/7477309/debug-writeline-is-not-printing-anything">Debug.Writeline is Not printing anything</a></p>
  
  <p><a href="https://stackoverflow.com/questions/5992094/debug-writeline-stops-working">Debug.Writeline stops working</a></p>
  
  <p><a href="https://stackoverflow.com/questions/10128179/visual-studio-2010-suddenly-stops-displaying-debug-output">Visual Studio 2010 suddenly stops displaying Debug output</a></p>
  
  <p>but nothing has worked. To clarify</p>
  
  <ul>
  <li>I am using vs2010 pro sp1.</li>
  <li>The projects are using the .net4 framework.</li>
  <li>I have the Debug Constants Set.</li>
  <li>The Debugger is still attached as I can set breakpoints and they are hit.</li>
  <li>Both projects are set to build under "Any CPU" (I tried with both as X86 and it didnt help)</li>
  <li>I am running on Windows 7 x64</li>
  </ul>
  
  <p>And after following all the suggestions, I dont have a fix.  None of those Posts above were actually answered.</p>
  
  <p>So just how does one fix this ?</p>
  
  <p>I thought I would create a seperate solution to reproduce this problem.</p>
  
  <p>You can download my solution that reproduces the bug here <a href="https://drive.google.com/uc?export=download&amp;confirm=&amp;id=0B0SLafLeQj5GOGxORThMWWhYV28" rel="nofollow noreferrer">https://drive.google.com/uc?export=download&amp;confirm=&amp;id=0B0SLafLeQj5GOGxORThMWWhYV28</a></p>
  
  <p>So I made 2 windows apps, and set them to both start at the same time.  In each app I start a thread, and in the Thread I do a Debug.WriteLine</p>
  
  <p>It seems to get some sort of deadlock and stop writing the output.  This appears to be a bug in Visual Studio, which I am highly surprised at.  Must I believe that it is impossible to have 2 projects with threads doing Debug.WriteLine at the same time ?</p>
  
  <p>Once again, I am in deperate need of a way to fix this and still get Debug Output.
  Oh, and I have also tried the option of redirecting output to the immediate window with no success either.</p>