Reputation: 8704
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?
Upvotes: 5
Views: 5346
Reputation: 21
Just want to say for anyone coming to this question that the answer given and which received 0, System.Diagnostics.Debug.Listeners(0).WriteLine worked for me in VS2013. Change console.writeLine and or debug.WriteLine to the above , open your immediate window and output is there. Good luck
Upvotes: 0
Reputation: 125
or use this:
System.Diagnostics.Debug.Listeners(0).WriteLine
instead of just Debug.WriteLine
Upvotes: 3
Reputation: 3716
I fixed that problem closing the project, delete 'bin' and 'obj' folders. Reopen project and Debug.WriteLine works...
Upvotes: 1
Reputation: 8704
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.
Upvotes: 2