There are several considerations to keep in mind:
- Silverlight code is executed in web browser.
- Silverlight runtime is started once for all browsers of the one type.
- dotTrace tracks only one instance of browser - the one that it starts.
- Only silverlight 4.0 and higher runtime is supported. (Previous runtimes doesn't support profiling API).
Because of all that considerations recommended workflow is:
- Before profilation close all browsers and browser processes of the type that you are going to exercise.
- Start dotTrace as standalone not from Visual Studio.
- Select "Profile" -> "Local Computer" -> "Connect".
- Select Profiler kind: "Silverlight". Click "OK". Browser instance will be started.
- In the exactly that browser instance (started by dotTrace) load url and exercise your Silverlight application.
- Get snapshot. We are done.