I am debugging a Windows service (by hitting F5 in Visual Studio 2010) using the following code:
F5
In Program.cs file:
Navigate to Project Properties -> Build and be sure that "Define DEBUG Constant" and "Define TRACE Constant" checkboxes are checked.