The common technique many developers use to debug Silverlight Out of Browser applications is to attach the debugger to the SLLauncher.exe process. However, there is a another way to debug installed OoB apps. Attaching to the process does not allow you to catch and debug any startup code however this technique below does allow you to do so.

If you are running a Silverlight 4 beta application hosted in a web project, here are the steps to debug when in OoB mode.

  1. Set the Web project that hosts the Silverlight application as the startup project in the solution
  2. Run (press F5)
  3. Install the application onto the computerimage
  4. Close the OoB application and stop debugging
  5. Set the Silverlight application as the startup project in the solution
  6. Right click the Silverlight application and choose Project Propertiesimage 
  7. Set the Start Action to “Installed out-of-browser application”
  8. Save all files in the project
  9. Set a breakpoint in the OoB application’s main formimage
  10. Press F5 and now you are debugging the OoB application!