I have this problem that has been giving me grief for most of the day and then some.
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.
Now I have checked everything I can think of. I have tried things from various posts such as
Debug.Writeline is Not printing anything
Visual Studio 2010 suddenly stops displaying Debug output
but nothing has worked. To clarify
- I am using vs2010 pro sp1.
- The projects are using the .net4 framework.
- I have the Debug Constants Set.
- The Debugger is still attached as I can set breakpoints and they are hit.
- Both projects are set to build under "Any CPU" (I tried with both as X86 and it didnt help)
- I am running on Windows 7 x64
And after following all the suggestions, I dont have a fix. None of those Posts above were actually answered.
So just how does one fix this ?
I thought I would create a seperate solution to reproduce this problem.
You can download my solution that reproduces the bug here https://drive.google.com/uc?export=download&confirm=&id=0B0SLafLeQj5GOGxORThMWWhYV28
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
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 ?
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.