O'Reilly logo

Visual Basic 2010 Unleashed by Alessandro Del Sole

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding Trace Listeners

In the preceding examples related to the Debug class (and consequently related to the Trace class too), we saw how to send the output of the debugger to the Output window. The .NET Framework enables sending the output to other targets, known as trace listeners. A trace listener is basically an object that “listens” to what is happening at debugging time and then collects information under various forms. For example, you could collect information as XML files or just send such information to the Output window. Both Debug and Trace classes expose a property named Listeners that represents a set of built-in listeners. Table 5.3 groups the .NET Framework built-in listeners.

Table 5.3 .NET Built-In Trace Listeners

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required