How to attach WinDbg to a service?
There are various ways to do this.
Find the PID for process that is hosting the service. You can do this with the help of command,
tasklist /svcLook for service and associated PID, then go to command prompt, into the directory where windbg is installed and give command,
windbg.exe -p <ProcessID>Another way is to directly use the service name as parameter to windbg. This is more convenient way, but hardly known to users/developers. You can use following command,
windbg.exe -psn RPCSS
Above command will find out the process which is hosting RPCSS process and then attach the debugger to that process.
Stay tuned..
Comments
Anonymous
October 26, 2007
PingBack from http://msdnrss.thecoderblogs.com/2007/10/27/how-to-attach-windbg-to-a-service/Anonymous
November 07, 2007
Here is a KB article that has few other options to attach windbg to a service. http://support.microsoft.com/kb/824344