Directives

13.1 Start a project without debugging rather than remove or disable debug code.

If you want to run a project as an end-user would (without calls to the Debug object, without stopping at breakpoints, and so forth), select Start Without Debugging from the Debug menu or press Ctrl+F5. Doing so disables the debugger so that you see exactly what an end-user would see, and you don’t have to concern yourself with commenting Debug calls and disabling breakpoints.

13.2 Don’t create an expression that modifies data when calling Debug.Assert.

When writing an expression for Debug.Assert, make sure that the expression doesn’t alter any data within the procedure. If it does, the results you experience while debugging might not be the same as ...

Get Practical Standards for Microsoft® Visual Basic® .NET, Second Edition 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.