Context: .NET web service deployed on local IIS in XP. VS 2010 used to debug the webservice code.
Problem:
I am familiar with debugging a hosted webservice by attaching VS to ASP.NET worker process. This approach works if the portion of code being debugged is not the initialization code such as constructors within webservice. When the ASP NET worker process is created, it calls the constructors in the webservice. So by the time we attach to ASP NET worker process from VS, the constructors have already been invoked and therefore not possible to debug.
How do i attach to the ASPNET process and debug the webservice even before it reaches the constructors within the webservice?
Almost a duplicate of this.
You can insert a
instruction in the web service constructor to be prompted for a debugger to attach. See MSDN.