How to debug a Windows Service in Visual Stdio once it is installed

To debug a Windows Service once it has been installed follow
the steps below

Copy the pdb files in the same folder where rest
of the dlls are for Windows Service

Go to visual studio and Tools>Attach to

Look for something with the name of your Windows
Service (Make sure windows service is running)

If you want to run Windows Service before you
attach to a process it is already passed the step you want to debug then best
way is to put it to sleep for two minutes or so….Something like below should do
the job


Now run the service and attach it to process and you should be able to step into code

Comments are closed.