• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2063
  • Last Modified:

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'

0
Tech_Dr
Asked:
Tech_Dr
3 Solutions
 
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
 
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
hesCommented:
In the output window do you have
"Show Output From: Debug" selected
0
 
MedievalWarriorCommented:
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_DrAuthor 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:
There is a context menu in the Output/Debug pane. "Program Output" menu item was accidentally cleared. Works ok now.
0
 
Tech_DrAuthor Commented:
Own outside research led to solution.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now