1. Put a debug break point in the WCF code.
  2. Run the web app that is calling the WCF services.
  3. Go back to Visual Studio -> “Debug” -> “Attach To Process” and select the WCF services (MyService01.exe).
  4. Go back to the web app and run the code to reach the break point.

You need to attach the debugger to the process that your wcf service is running in.

If in iis you need to attach to the corresponding w3p.exe process.

If in a stand alone app or windows service, attach to the name of your exe.

In Visual Studio, on the debugger menu, there is an “attach to process”. Open the relevant code, set a breakpoint, and call the service causing that code path to execute.

Sources:

https://stackoverflow.com/questions/8752731/how-to-debug-wcf-programs

Last modified: March 24, 2021

Author

Comments

Write a Reply or Comment