How to debug Silverlight Out-Of-Browser Application

                                     How to debug Silverlight Out-Of-Browser Application

In Silverligh 4 we have the feature called Out-Of-Browser which gives the additional features to the silverlight application.

In Visual Studio, on the Debug page of the Project Designer, you can select Out-of-browser application as the Start Action. Then, when you start debugging, Visual Studio will launch the out-of-browser application and attach the debugger automatically.

If you have a Web project in your solution, you must set the Silverlight project as the startup project in order to use this feature.

Silverlight 4 provides command-line support for debugging on Windows only. You can use sllauncher.exe to run a XAP file in an out-of-browser window as if it had been installed. You can then attach a debugger to the out-of-browser window process.

To run a XAP file in an out-of-browser window, use the following command line:

sllauncher /emulate: xapfilename /origin: uri

The origin parameter indicates the URI of the application's site of origin. This is required to assign security privileges, such as access to isolated storage.

It also provides a base URI that the application can use to resolve relative URIs, access remote resources, and perform application updates.

You can find the sllauncher.exe program in one of the following locations:

  • On 32-bit operating systems: C:\Program Files\Microsoft Silverlight

  • On 64-bit operating systems: C:\Program Files (x86)\Microsoft Silverlight

For information about sllauncher error messages, see SLLauncher Error Messages.

 

Ebook Download
View all
Learn
View all