IntelliTrace and WCF Services called by Silverlight
IntelliTrace is not supported in Silverlight due to the security model. IntelliTrace is supported for Windows Communication Foundation (WCF) projects hosted in a web server such as Internet Information Server (IIS) or Internet Information Server Express (IIS Express). When debugging an application in Visual Studio Ultimate that contains both Silverlight and WCF services projects you may encounter an IntelliTrace message indicating that IntelliTrace data is not being collected. Like the one shown in the screenshot below.
Fear not, all is not lost. Let’s examine this scenario in a bit more detail.
A simple solution was created in which a Silverlight application calls to a service to get some data. There are two projects in the solution. One is a Silverlight project that runs the user interface in the Silverlight host in the browser and the other project is a web server hosted project that supplies business logic.
Debugging the solution using Visual Studio Ultimate the Silverlight application is loaded into the Silverlight host in my browser and calls back to a WCF service that is running in IIS Express. After the user interface is rendered switching back to Visual Studio Ultimate I can choose to break execution to inspect the IntelliTrace data by using the IntelliTrace window.
After clicking the Break all link I am presented with the screenshot presented at the top of this post. The key piece of information presented here is the process that is identified.
This is the process running Internet Explorer that is hosting the Silverlight control. As stated at the beginning of this post, Silverlight is not supported by IntelliTrace. If you are interested in seeing the IntelliTrace data collected for the WCF service you need to change the process.
The easiest way to do this is with the Debug Location toolbar. Right click on a blank space in the Visual Studio toolbar area to get the Toolbars selection menu.
Using the Debug Location toolbar it is easy to switch from the Internet Explorer (iexplorer.exe) process to the IIS Express (iisexpress.exe) process.
As soon as you switch the process you will see any IntelliTrace events that were recorded for that process appear in the IntelliTrace window.
If you have any feedback we would love to hear it in the comments below or in our MSDN forum.