Is Debug.Write and Debug.WriteLine supposed to work?

They aren't appearing anywhere whether I ran the app or ran with debugger.

Tested with clean slate console app.

2 comments
Comment actions Permalink

Hi resting

The output should be on the Debugg output tab. 

If the output is not here, please add details about your case: what are your project type, OS, and Rider versions? Thanks!  

0
Comment actions Permalink

Thanks Alexandra Guk

My bad. Some how I needed to a trace listener, the below code works fine with Debug.WriteLine

// See https://aka.ms/new-console-template for more information

using System.Diagnostics;

Trace.Listeners.Add(new ConsoleTraceListener());

Debug.WriteLine("write line");

Console.WriteLine("console");

Console.ReadLine();
0

Please sign in to leave a comment.