Debugger.Launch();Now this is being simply ignored. What is reason of that?
Debugger.Launch() would call application with visual user interface. In Windows 8 this is impossible because services can't interact with desktop and run in interactive mode.
To debug service code we added the following code to OnStart method:
while (!Debugger.IsAttached) // waiting until debugger is attached { RequestAdditionalTime(1000); // prevents the service from timeout Thread.Sleep(1000); // gives you time to attach the debugger }