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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.