Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug.WriteLine is not writing output to OutputWindows in Visual Studio 2010

Tools|Options|Debugging Redirect all Output to Immediate is unchecked.
Tools|Options|Debugging|Output Window General output settings are all ON. Debug configuration is activated, define DEBUG constant is checked.

Still Debug.WriteLine("test") writes nothing to Output Window(Cant capture it in DebugView from sysinternals too). What can cause that?

like image 538
0x49D1 Avatar asked Jun 26 '12 08:06

0x49D1


2 Answers

or use this:

System.Diagnostics.Debug.Listeners(0).WriteLine

instead of just Debug.WriteLine

like image 144
user819490 Avatar answered Sep 21 '22 04:09

user819490


Had this in config file, hope that can help someone else:

<system.diagnostics>
    <trace>
      <listeners>
          <clear/>
      </listeners>
    </trace>
  </system.diagnostics>

removed clear, now everything works. Thank you @Hans Passant.

like image 40
0x49D1 Avatar answered Sep 20 '22 04:09

0x49D1