I’m Going to Test a Windows Service for Code Indexing

I was looking for how to debug an already installed Windows Service. And out of everything that doesn’t seem difficult to me, I found only this: 👻 This link is deader than Flash Player.(debugging where no extra window opens and the service starts immediately as a .NET application in the background).

I’m just afraid that it might behave differently from the installed Windows Service. This way, while debugging, I can catch errors much more easily and I don’t have to parse (event) logs on top of that, which with multiple event cases would get more and more confusing and complicated. But if, during this debugging, I also let it go through all the files it would work with in production and handled the individual differences, so that the service would have an already well-trodden path, that would be great.

And if you’re wondering why I’m solving this with a service instead of simply launching a program at Windows startup and then just never closing it, there are several “proper” answers to that.

  1. The service won’t collect information for a single program, but for multiple programs, and
  2. The service has to be ready for anything, it has to be perfectly debugged – I don’t want any user interface offering me choices about how the service should behave. And I don’t want one for any other reason either – I want the service to simply work in the background.
  3. Services are better suited to running for long periods – with my uptime of several days at a time, this is another plus for them.
Categories

Leave a Reply