Try to debug your application, I know it is difficult with service. But it is possible.
Put this code into your main method
#if DEBUG
service.DebugMode();
Thread.Sleep(Timeout.Infinite);
#else
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
service
};
ServiceBase.Run(ServicesToRun);
#endif
and in your service you going to have DebugMode method:
public void DebugMode()
{
this.OnStart(null);
}
and you can easily debug your service in VisualStudio in DEBUG mode.
here is a working example:
GitHub - xszaboj/debugWindowsService: simple solution how to debug windows service[
^]