When debugging a Windows service, I used to add a call to Thread.Sleep in OnStart and then attach Visual Studio manually:

protected override void OnStart(string[] args)
{
    Thread.Sleep(10000);
}

But this imposes that you manage to attach the debugger within the timeout limit by the Service Control Manager.

There is an easier solution to this problem and it is that the service launches the debugger itself and you attach it to Visual Studio.

protected override void OnStart(string[] args)
{
#if DEBUG
    if (Properties.Settings.Default.Debug)
    {
        System.Diagnostics.Debugger.Launch();
    }
#endif

    // Continue starting the service here.
}

By using the DEBUG directive this code is only included in debug builds. And with the custom Debug setting you can control from the settings file or command line argumets if you want to launch the debugger on startup.