Debugging, Asserting, and Tracing
Debugging, asserting, and tracing are still mainstays of application debugging. These capabilities are tucked away in the System.Diagnostics namespace. The System.Diagnostics.Debug.Write and System.Diagnostics.Debug.WriteLine statements replace Debug.Print from Visual Basic 6. The Debug.Assert shared method raises an exception if a condition fails. Assert is customarily used to ensure that application invariants—things that must be true about your application—remain true while your application runs. The System.Diagnostics.Trace class supports sending application trace information to a variety of locations.
NOTEThe System.Diagnostics namespace contains many more features than Debug, Assert, and Trace. However, ... |
Get Visual Basic® .NET Power Coding 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.