Debugging in Code

The .NET Framework offers the ability to interact with the debugger via managed code. You can use two classes, System.Diagnostics.Debug and System.Diagnostics.Trace, to verify conditions and evaluations that can be useful to provide feedback about your code if it is working correctly. Information generated by these classes can eventually be added to the application.

Debug and Trace are Singleton

Both Debug and Trace classes are single instance shared classes and therefore expose only shared members.

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.