What is wrong with my preprocessor directives in my web application? They work fine in another applications I have, but not in my current one. The logic in my directive is grayed out and is not being executed in debug mode.

If you have ever come across this situation, here is what you can do to resolve it. Two methods I used are to manually add "DEBUG" in your Visual Studio project's properties, and the other way is to manually edit the project file (*.csproj, *.vbproj, or whatever other language you use). I realize in the picture presented that #else is not necessary, but I show it for support.
-
In Visual Studio .Net, access your project's property pages by right clicking the project, then go to "Properties." Next, navigate to your Configuration Properties for your Debug configuration. In the Build section, there is a "Conditional Compilation Constants." Add "DEBUG" without the quotations to this entry. Click "OK" to exit the properties dialog. Your DEBUG code should now work.
- Navigate to your project's project file on the file system and open it for editing. In your Build/Settings section, modify your Debug Config section so "DefineConstants" has "DEBUG" in it. It should look like the following, unless you have other directives set.
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "true"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "bin\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>