Summary

Once appropriate statements and methods are in place, runtime debugging can make program verification more efficient by watching console printouts of viewing log files for pertinent results. Runtime debugging can be turned on and off with conditional attributes, specialized output methods that accept Boolean parameters, command line options, and preprocessing directives.

The Debug class is effective in development environments where the debugging code will be removed for deployment. Alternatively, the Trace class would be the best decision for situations where code should be deployed with a debugging capability.

Runtime debugging in trace-enabled code can be controlled with Boolean switches or multilevel trace switches. Each option provides ...

Get C# 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.