Monday, January 21, 2013

Windows Service Debugging

Debugging windows services in Visual Studio 2010 can be a royal pain in the ass! Particularly trying to set a breakpoint in the OnStart() method. After trying many methods, I found this:

http://www.codeproject.com/Articles/20458/Debugging-OnStart-Method-in-NET-Service-when-Debbu


The only downside I discovered is that you must always start debugging the service when it is started, otherwise it will continually wait for a debugger session and timeout. Once you stop debugging, the service continues running.


No comments: