Question Problem in Debugging Windows Service

Hitz

Member
Joined
Jul 22, 2011
Messages
9
Programming Experience
Beginner
Hi,
I am trying to debug windows service but i cannot do it properly.

This is what i followed:
my service name is MediTest

Debug(menu)-> Attach to process->MediTest.vshost.exe->attach

But the problem is that MediTest.vshost.exe is not getting highlighted to make it as attach to debugger.

Can any one tell me how to fix this?

And i also changed on start event as follows to allow to debug efficinetly:

Protected Overrides Sub OnStart(ByVal args() As String)
Thread.Sleep(15000)
AddHandler timer.Elapsed, AddressOf Me.OnElapsedTime
timer.Interval = 60000
timer.Enabled = True
AddToFile("starting service")
End Sub
 
Hi,

i fixed this. I have to select MediTest.exe instead i am trying to select MediTest.vshost.exe.

Sorry guys.
 
There is no xyz.exe (vs. xyz.vshost.exe) choice in my list of attachable processes

I am having the same debugging problem, but I do not have a non-vshost exe to attach to. I wrote all the processing code as a normal windows application (with an interface), in order to debug it to the best of my ability before cutting and pasting code into a "windows service" project to create a service. But, although my service starts, it does not do what it is supposed to do...even simple things like recording messages to the event log.

I am at a complete loss as to what's wrong and have no ideas about how to debug it.

Thanks for any help.

"We can put men on the moon, but we can't put metal in the microwave."
Frasier Crane - Cheers
 
Back
Top