- Put a debug break point in the WCF code.
- Run the web app that is calling the WCF services.
- Go back to Visual Studio -> “Debug” -> “Attach To Process” and select the WCF services (MyService01.exe).
- 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
Comments