The Trace
Class
The Trace
class, which is also exposed by the System.Diagnostics
namespace, works exactly like the Debug
class. One important difference influences the building process. The output of the Debug
class is included in the build output only if the DEBUG
constant is defined, whereas the Trace
class’ output is included in the build output only if the TRACE
constant is defined. When you build your applications with the Debug configuration active, both constants are defined, so both outputs are included. The Release configuration defines instead only the TRACE
constant, so it includes only this output.
Get Visual Basic® 2010 Unleashed 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.