Attaching the debugger to a running WCF service process
Another common scenario while debugging is when attaching the debugger to a running WCF service. Suppose HelloWorldService
is hosted and running outside Visual Studio, either in IIS or in a managed application such as HostCmdLineApp
. In this case, the client application is also running outside of Visual Studio. At a certain point, you might want to start debugging the running WCF service. In this case, we can attach the debugger to the running WCF service process and start debugging it.
Note
Even if the WCF service is hosted inside Visual Studio, like with the HostExpressServer
website, in certain environments, you might still not be able to step inside the service directly from the client application due to some debugging settings of your Visual Studio or IIS Express. In this case, you can use the same technique we will learn here to debug the service, just by attaching to the IIS Express process.