Debugging Loggers

Custom loggers are very easy to write and for the most part are easy to implement. Even still, if you are creating new loggers you may need to debug the behavior. Debugging custom loggers is very similar to debugging custom tasks. Just like debugging custom tasks, in the next list you will find three methods that can be used to debug loggers:

  1. Examine the contents of the log

  2. Debugger.Launch()

  3. Start MSBuild as External Program

The simplest and least informative approach is the first one, which entails simply examining the contents of the log to determine the behavior of the logger. If you decide to use this technique, you may want to set the verbosity of the logger to either Detailed or Diagnostic, if possible. This method can be used ...

Get Inside the Microsoft® Build Engine: Using MSBuild and Team Foundation Build now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.