c# windows service debug

Use the following code in service OnStart method:
System.Diagnostics.Debugger.Launch();