Writing to output window of Visual Studio

前端 未结 13 1729
忘了有多久
忘了有多久 2020-11-28 17:56

I am trying to write a message to the output window for debugging purposes. I searched for a function like Java\'s system.out.println(\"\"). I tried Debug

13条回答
  •  失恋的感觉
    2020-11-28 18:10

    The call

    System.Diagnostics.Debug.WriteLine("message");
    

    fails when working with .NET Core (V 1.0 or 1.1).

    We are supposed to create and use a logger from Microsoft.Extensions.Logging, but that log only appears in the dotnet.exe popup console window, not in Visual Studio's Output window.

提交回复
热议问题