You need to attach to the process after the service has started. I used to put a 20 sec delay in the start method to allow me to attach to the process in the start code.

 

Another alternative would be to make your code a class library that has the same entry points, e.g. start, stop etc.

 

Then the service application can call these methods, and also make say a console app that calls the same methods that you can use as the test application and debug everything there.

 

HTH

 

Matt

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Krishnan
Sent: 22 September 2005 07:58
Cc: visual_studio_dotnet; Microsofts_C_Sharp; dotnetsig; c-sharp-programming; CSharpNET; csharp; C_Sharp_World; AspNetAnyQuestionIsOk; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [Microsofts_C_Sharp] How to debug a windows service application

 

 

Hi,

 

Is it possible to debug a windows service application. I have created on windows service application and installed that exe using installutil.

While the service is running in the system i want to debug that service using the IDE.

how to do ??

 

Regards,
Krishnan

 



SPONSORED LINKS
Basic programming language C programming language Computer programming languages
Programming languages C programming language Software programming language


YAHOO! GROUPS LINKS




Reply via email to