I am debugging a Windows service (by hitting F5 in Visual Studio 2010) using the following code:
F5
In Program.cs file:
Environment.UserInteractive is not the same thing as Debug mode -- that just means that you are running it in the console instead of as a service. Make sure that your build configuration is set to Debug.
Environment.UserInteractive