1

I am new to dotnet core.

In Visual Studio, when using debug mode, how can I read the console for messages from Console.WriteLine("Test Message")?

Jim_Mcdonalds
  • 426
  • 5
  • 15

2 Answers2

3

In visual studio, look for the button you use to debug (green arrow with "IIS Express" written). In front of "IIS Express" you should see a dropdown arrow. Click on the dropdown and select your app name. Now, when you re-run your project on debug, you will find purple console window popup. Your Console.WriteLine should show there.

Neville Nazerane
  • 6,622
  • 3
  • 46
  • 79
0

The console writes to the output window, the one that starts spitting out lines when the project is building when you hit run.

OK! Finally figured it out, it's System.Diagnostics.Debug.WriteLine(); For asp.net core, from this post Where does Console.WriteLine go in ASP.NET? I made a new project and got my string to show up in the output window using this line.

Ryan
  • 169
  • 8