When developing all kind of projects a good strategy for logging can save you a lot of time and frustration. Personally I am very found of using Apache log4net and this post will describe the most important features in log4net and how to implement and use this in a .Net Compact Framework project.
log4net can be configured with different appenders that logs to different sources (file, output window, smtp, server ++). You can also configure what kind of log levels will be written to the different appenders (info, debug, warn, error and fatal).
Most of the time I use two different appenders: I use the DebugAppender to log to my output window in Visual Studio, I like to set this appender to log all levels. I also like to use a LogFileAppender to log to a file on the device, I usually set this appender to only log error and fatal.
You can read documentation and download Apache log4net at http://logging.apache.org/log4net/index.html