- Create a windows service project that only has VS generated code in it.
- Create a DLL proeject that contains the service object.
- Let service project call the service object to start it.Then your service would work. But this is not for debugging.
- Create a normal windows application, and just as the service project, just call the service object ans start it. This application is convenient for you to debug the service object.
Friday, October 18, 2013
Debugging a windows service is not as convenient as windows application as it states on this MSDN document.A simple way to improve debugging is to separate service function code from the service application to a DLL, and then create an normal windows application start the service object in DLL. Detailed steps as following: