Writing trace information in a windows form app

后端 未结 5 751
小鲜肉
小鲜肉 2021-02-11 08:39

I know how to write trace statements that I can view in a webforms environment, but how do I do this in a windows forms app?

I am inside of a static method, and I want t

5条回答
  •  情深已故
    2021-02-11 09:12

    The simplest way is to use either System.Diagnostics.Debug.WriteLine or System.Diagnostics.Trace.WriteLine. If you have a debugger attached, the messages will show up in the output window, otherwise run DebugView to see the messages (you'll need to play with the filtering some to exclude the noise).

提交回复
热议问题