The technique I use (I'm not sure that it would be applicable to all scenarios) is to
wrap the actual logic in a class that resides in a separate assembly. The service
merely instantiates an instance of this class and calls the entrypoint method to the
business logic routines.
This allows for two things with simple services:
1. You can instantiate multiple instances of the class and throw them on separate
threads if you need identical business logic operating on different parameters.
2. You can create a "wrapper" windows application that also creates an instance of the
class. Then you can put the breakpoint on the entrypoint and have full control over
the debugging session.
-Brooke
-----Original Message-----
From: Igor Kravtzov [mailto:[EMAIL PROTECTED]]
Sent: Wed 5/29/2002 11:37 AM
To: [EMAIL PROTECTED]
Cc:
Subject: [DOTNET] Debugging windows service - C#
Hi guys,
I can't step into my C# source code when I am trying to debug .NET windows
service. The service is definitely running, I managed to attach to it, but
all break points become disabled. What's wrong? It is a debug version, the
project info file is in the same folder where executable of the service...
Any thought?
Is there a way to debug windows service different from described in MSDN?
As I remember, it is possible to run service as a console application, if
you use ATL.
Is it possible with windows service written in C#?
/Igor
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
b‹œjzÞiÙž²Æ zÇë¢kax3“4DÚÈb½ë§²æìr¸›yúè˜3“4Dè®Ë›±Êâmëh¢Ø^¬7¯zZ)1éí¢¹b²Û¶m§ÿÝŠÇ.²Ç^½éh¥Ê&