Method One:
server-side settings :
1. Open the solution you want to debug, right-click on the WCF Server project and set it as the startup project
2. Click on this solution
Or, press F5 directly to start the WCF service-side project.
3, look for the port number:
I, mode one
After you start debugging, the following interface appears in your browser
Note that the port number in the address bar is a must.
II, mode two:
After you start the WCF service project, it appears in the lower-right corner of the desktop, as shown in the following icon:
You can also see the port number here, because I restarted the WCF project once, so the port number displayed is not the same as in the browser.
Client Settings :
4. Open the solution again, set the client as the startup project, and call the server side in the UI project, so set the UI project as the startup item
5. Modify the port number of the WCF reference address in the UI's app. Config (based on the port number of the WCF service project that was started earlier)
6, start the UI, that is, the solution of the client, at this time, as long as the service side of the corresponding function to add a breakpoint can be tracked in.
Add:
To debug the server in this way, you need to reference the current local WCF service when the client references the WCF service, such as in this case, you can add:
1. Add a service reference where you want to add a WCF service reference:
Click in the pop-up screen and find that the VS will automatically find the service in the solution, such as
OK, get it done!
Copyright: jiankunking Source: http://blog.csdn.net/jiankunking This article is copyright to the author and Csdn, Welcome to reprint, but without the consent of the author must retain this paragraph, and in the article page obvious location to the original connection.
C # Winform WCF debugging service-side programs