Step 1.
Add the following code in what you want to debug.
System.Diagnostics.Debugger.Launch();
Step 2.
Install and start the service.
That's it.
However, other way as below url:
http://*.com/questions/4678819/how-to-debug-windows-services-in-visual-studio