Tag Archives: log file

Use Debug and Trace listeners in C#

By default, the Debug and Trace classes send messages to the Console window. Sometimes it might be nice to capture that text and save it in a file. This example shows how you can do that. The Debug and Trace … Continue reading

Posted in debugging | Tagged , , , , , , , , , , , | Leave a comment

Make a simple event logger in C#

Usually the debugger lets you examine how a program works quite effectively, but sometimes it’s useful to use an event logger to record events for later study. For example, when you’re working with mouse events, stopping execution at a break … Continue reading

Posted in classes, debugging, files | Tagged , , , , , , , , , , | 3 Comments