Sorry for the extreme newbie question, but I couldn't find the answer elsewhere and haven't actually ever done anything like this myself (go figure -- I guess that happens when your company uses the production environment for testing).
It would be nice if Visual Studio offered some mechanism for specifying that certain segments of code (e.g., logging) should only be included in the Debug build. Does this exist? I'm interested in methods for this in both C# and VB.NET, and on VS 2005, in case that matters.