Writing to output window of Visual Studio

前端 未结 13 1770
忘了有多久
忘了有多久 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-28 17:59

    Add the System.Diagnostics namespace, and then you can use Debug.WriteLine() to quickly print a message to the output window of the IDE. For more details, please refer to these:

    • How to trace and debug in Visual C#
    • A Treatise on Using Debug and Trace classes, including Exception Handling

提交回复
热议问题