Debugging Windows Service

G

Guest

Dear:

I created a windows service and I need to debug it , can anyone tell me how
can I debug It?
I tried to attach the process using visual .net (Tools->Debug
Process->Select my process then attach) when I place a breakpoint it will
have (?) not loaded.

any ideas?
 
G

Guest

Hi Raed,

I do not understand the problem you state at the end. What will not have
loaded?

Normally, you should install the debug-version of the service program. Along
with pdb-information, the debugger can allow you to debug your code.

Although I have never really debugged a service from .NET (IIRC), I think
the way you did it, is the way it should be done. After .NET debugger
attached to the process you can place the breakpoints in code. If the service
is a debug-version then that should work.

Can you verify that you are using the debug version of your service program?
Did you place breakpoints before or after you attached? Perhaps you should
do it only after the debugger attached to the process.

HTH,
Tom T.
 
G

Guest

I meant by not loaded that when I placed the breakpoint into my code the
breakpoint shape has question mark(?) though I attached the process.
But as u pointed out the problem I was using the release version not debug
version.
It works now.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top