Debug.WriteLine does not work.
I don't know if this is a common problem but for some reason Debug.WriteLine stopped to print anything in the Output window for some time now. Same goes with Trace.WriteLine.
I've tried to find any options about it in Visual Studio, the only thing I managed to find is to redirect the output to the Immediate window, but even this does not work.
Both Debug.WriteLine and Trace.WriteLine print out nothing in the Output window.
Anybody has any ideas?
Thank you all
George
[520 byte] By [
gnentid] at [2008-1-7]
Any possibility you are no longer using a Debug mode? You can set your configuration to Debug or Release. If you are set for Release mode - the debug objects no longer work.
Hope this helps.
No this is not the case. I haven't even reached the point where a release build is required.
Thanks for the reply though...
First, I assume you're using Visual Studio 2005, SP1. Knowing that, in addition to your platform and programming language might help us figure out what the problem is.
Second, does Debug.WriteLine() work if you create a small sample project? If it works for the new sample project but not yours, try deleting the hidden .SUO file that resides next to your .SLN file, delete your project's output directory and rebuild. If it doesn't work for the new sample project, then please post that information.
BTW, the SUO file contains Solution User Options, such as watch window entries, breakpoints, bookmarks, etc. So if you don't want to lose that information you can try renaming it rather than deleting it.
Yes, I am using Visual Studio 2005 SP1
Version 8.0.50727.867 (vsvista.050727-8600)
under Windows Vista, and the language is C#.
It does not work with any project, new or not. I make a lot of small projects for testing pieces of code before inserting it into bigger projects.
I have created one anyway after reading you post, it does the same thing.
Since you asked, I have created small projects in VB and J# to test this, and the same problem happens there too.
I can see other messages in the Output window, like modules that have been loaded and threads the have exitied,
but none of my messages.
Have ou tried resetting your IDE settings from Tools | Import and Export Settings to, let's say, the General Development Settings?
Thanks,
Monica Boris
VS Debugger Team
I hope this isn't the case, since it was too obvious for us to miss it

, but have you right clicked on the Output Window and checked the "Program Output" item?
I had a feeling that this started to happen when I installed Infragistics components. So I removed them and installed them again,
and now it works fine.
Go figure...
Thank you all for you help...
I'm also experincing the same problem with Visual Studio 2005 SP1. Debug.Writeline stopped working for me across all of my projects around the same time as Gnentid. The symptoms are the same. I'm getting module load and thread exit message and nothing else. eg..
'myapp.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Xml\........
Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Program Output is checked and I've tried createing a new project just to test Debug.WriteLine and it still doesn't work.
Neither Trace.WriteLine not Debug.WriteLine write to the Debug Window but Trace.Writeline does write to the log file if you define a listener so I've been using that as a work around. As far as I can tell I'm running in Debug Mode. I can't find a setting anywhere to change it and I've been running the app from Debug -> Start Debugging.