My code uses lots of WCF calls and when I try to debug it, it doesnt go to the service code itself. Is there a way to debug WCF code somehow?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.
Outside of debugging, using .net tracing with switchable levels is a good way to get insight to what’s going on. I typically setup sys internals debugview to color highlight errors and warnings and constantly have it running while running code or tests. Colored lines out of my peripheral vision while working finds issues.