One of the cool new features in Visual Studio 2008 is automated debugging for WCF service libraries. Simply create a new WCF Service Library project (using the new WCF project templates), press F5, and viola!
When you press F5, Visual Studio launches WcfSvcHost.exe, a generic WCF host application that hosts your service library. WCF Service Library projects now come with an App.config file — this is where WcfSvcHost.exe reads the service/endpoint configuration during initialization. A generic WCF client application (WcfTestClient.exe) is also started, and it communicates with your service via MEX to download metadata. It provides a generic mechanism for filling out the data required by each service operation, invoking the operation, and viewing the results. It even works with complex types unlike the ASMX-generated test forms. Sweet.
You can configure the service library to use a custom client application if you desire. Go to the Debug tab within the project properties and specify your app as a command-line argument ( /client:“YourClient.exe“ ).
Note: for some reason the latest drop of the BizTalk Services SDK (0.9.0324.0) breaks this feature. So if you have the BizTalk Services SDK installed and you try pressing F5, you’ll most likely get the following exception:
Unhandled exception has occured in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
Object reference not set to an instance of an object.
If you uninstall the BizTalk Services SDK, this feature will work normally once again.