Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VisualStudio: no debug output

I'm trying to debug a C# application. The method:

System.Diagnostics.Debug.WriteLine("something"); 

should do the work, but in the Output window (set to "debug" and with all the options activated) I can't see a single line I'm trying to write. Any idea? Thanks

EDIT: I'm using VS2008

like image 283
pistacchio Avatar asked Jun 01 '09 14:06

pistacchio


People also ask

How do I show Debug output in Visual Studio?

To see the debug output window, in Microsoft Visual Studio, click View, click Other Windows, and then click Output. You can view the debug output in this window only if the debugger is attached to the process that is writing to the output window.

How do I turn on output in Visual Studio?

Go to Tools, Options, Projects And Solutions, and uncheck Show Output Window when Build Starts.

How do I fix the Output window in Visual Studio?

Go to "Tools" -> "Options..." and under the "Projects and Solutions" tab expander, you can find a checkbox labeled "Show Output window when build starts". Check it to enable the output window/pane to appear automatically when you build your project. Keep it unchecked, if you don't want to open it automatically.


2 Answers

There's an option under Tools-Options-Debugging-General, Redirect all Output Window text to the Immediate Window. Make sure that's disabled. However, by default it isn't, so I doubt that's your issue. You can also just check your Immediate Window to see if it's outputting there.

You might also want to try resetting all your environment settings. (Tools - Import and Export Settings - Reset all settings.)

like image 168
Richard Anthony Freeman-Hein Avatar answered Sep 25 '22 01:09

Richard Anthony Freeman-Hein


Also worth checking - right-click in the output window, and ensure "Program output" is checked.

like image 20
PaulS Avatar answered Sep 25 '22 01:09

PaulS