Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug a remotely hosted WCF web service

Tags:

debugging

wcf

I am new to WCF web service development and I can use some help. I have a simple web service written in C# that I'm hosting on a remote server (it's hosted on IIS 5.1). I've written a client application for that web service that I'm running on my workstation.I am able to connect to the service without any problems. However, I would like to be able to debug the web service.I need to be able to step through the code, set breakpoints, etc.How do I achieve that from my local machine? I'm using Visual Studio 2010. Thank you in advance.

like image 537
Emil D Avatar asked May 20 '11 14:05

Emil D


1 Answers

I see two possibilities:

  1. Local debugging: For debugging, run your service on your local machine. If you want to run it on the local IIS, simply start a second instance if VS2010 and attach to the w3wp.exe process (menu Tools -> Attach to process)

  2. Remote Debugging: You have to install and start the VS2010 remote debugger on the server. Start a second instance of VS2010 on your development box and connect to the remote debugger with menu Tools -> Attach to process.

See msdn for more information about remote debugging with VS2010.

like image 141
Jan Avatar answered Oct 26 '22 23:10

Jan