To profile XBAP application from Visual Studio
  1. Set Internet Explorer as the default browser on your local computer.
  2. Open a solution in Visual Studio.
  3. In the Solution Explorer window, right-click the startup project, then click Properties. The Properties window opens.
  4. Click the Debug tab, then click Start external program. Enter the full path to the PresentationHost.exe file, or click the ellipsis button to open the Select File dialog box and browse to the file.
  5. On the main menu, click dotTrace | Profile Startup Project.
  6. Optionally, change the default settingss in the Profiler Configuration dialog and click Run.