How to debug custom SharePoint Web Service

Frequent Contributor

Hi There,

I have question about my custom Web Service for SharePoint. I create a web service for SharePoint and publish it into the layouts folder. currently, I have a client app will call remote the web service. I will trace the code by using vs .NET 2019. when my code call remote web service I cannot go into the source code of the remote web service to see what happened. before I just change the web.config in the layouts folder and can watch the difference in the code. but now I cannot do it. How should I solve it out??

Is there some configuration missing now??


1 Reply
Besides modifying your web.config you'd have to attach your debugger to the W3WP (IIS) worker process. You can do so from within Visual Studio --> Debug --> Attach to process.

There is probably more than 1 instance of this process running. You could attach to all of them or figure out the correct one by following the steps detailed in below blog:

Hope this helps