Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see the output of Console application when running with WSL2 profile?

I have written a simple console application targeting .Net5. It's working as expected. I am running the application with the WSL 2 profile now. It's running successfully, but not showing output as it shows for the normal console application (I mean it is not showing the window itself). It is hitting the breakpoint as well. Based on this article, My understanding is we can debug the application in Linux from a Windows machine.

So how can I see the output of the console application? Also, does it create any folder or files in Linux?

static void Main(string[] args)
{
    Console.WriteLine("Hello");
    Console.Read();
}
like image 587
vivek nuna Avatar asked Dec 01 '25 20:12

vivek nuna


1 Answers

You can click Debug->windows->output to show the output.

enter image description here

Then, you can choose where you want to show the output.

enter image description here

like image 116
Jack J Jun - MSFT Avatar answered Dec 03 '25 09:12

Jack J Jun - MSFT