Debug.Print and Debug.Write no longer work in Visual Studio 2010

Suddenly Debug.Print statements in my C# code are no longer being displayed in my Output window. I am running a Debug configuration of a simple Hello World C# Form application. "Project Properties/Build/Define DEBUG constant" is selected. Tools/Options/Debugging items are set to default values, including "Redirect all Output Window text . . ." cleared. I have made no app.config modifications (regarding TraceListeners or anything). I have relied on Debug.Print for years.  This problem occurs in all my projects now.

Not sure if this is relevant but when I step over the first Debug.Print statement, this shows in the Output window: " Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'

Tech_DrAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Tech_DrConnect With a Mentor Author Commented:
There is a context menu in the Output/Debug pane. "Program Output" menu item was accidentally cleared. Works ok now.
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Debug statements appear in the 'Immediate' window.
Console statements appear in the 'Output' window.
0
 
Tech_DrAuthor Commented:
@ Idle Mind. By default the output of Debug statements appear in the Output window, not Immediate window. Anyway I already examined the Immediate window and nothing shows up there either.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Your "default" is definitely different from my setup then...

I've been using many flavors of Visual Studio since version 2003 and, for me, it's always been the way I described.

I'm currently using VS2010 Premium.
0
 
hesCommented:
In the output window do you have
"Show Output From: Debug" selected
0
 
MedievalWarriorConnect With a Mentor Commented:
The default installation doesn't display the "Immediate Window" by default only the "Output Window". If you need to show the "Immediate Window" just press CTRL+G in the IDE. You will want to do this two times once when your project isn't running (code mode) and again when you run your project.
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
I've always setup my Visual Studio with VB.Net as the default...wonder if this makes any difference?...
0
 
Tech_DrConnect With a Mentor Author Commented:
Thanks for all comments and suggestions. I may have found the solution here:

http://www.dotnetmonster.com/Uwe/Forum.aspx/vs-net-debugging/1945/Trace-in-Output-Window-is-not-displayed

For a similar problem the MVP respondent says "- R-Click in Debug Output window and make sure that "Program Output" is checked."
I bet that's what it is. Most likely I must have accidentally unchecked this item without noticing. Will look on Monday when I get back to work.
0
 
Tech_DrAuthor Commented:
Own outside research led to solution.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.