1 0 Tag Archives: Debug
post icon

Silverlight Tip of the Day #5 – Debugging Out of Browser Applications

By default, when debugging, Silverlight will launch your application in the browser. However, if you application is configured to run in Out of Browser (OOB) mode and is installed on the box you can configure debugging to occur directly in the OOB application window rather than the browser.

To accomplish this follow these steps:

   1. Verify your application is installed for OOB use on the box you are debugging from.

   2. Open up your application in Visual Studio, right click on Silverlight application in the solution explorer and choose “Properties”.

   3. Click on the Debug tab and then click on the “Out-of-browser application” radio button.

   4. Finally, right click on your Silverlight application again in the solution explorer and choose “Set as Startup Project”.

Hit F5 and you will be good to go:

   image

Thank you,

–Mike

Leave a Comment
post icon

Silverlight: Unable to start Debugging. The Silverlight managed debugging package isn’t installed.

Due to a design change in the Silverlight 4 installer you may see the following dialog when you attempt to debug:

This is due to the fact that the installer causes any older developer runtime to be upgraded when a newer client runtime installer is executed. As a result, the debugging components are uninstalled.

To fix this, please re-install the latest Silverlight developer runtime which can be found at via the following FWLink: http://go.microsoft.com/fwlink/?LinkID=188039

A fix for this will be considered during the SL5 timeframe.

Thanks,

–Mike

Leave a Comment
post icon

Silverlight Tip of the Day #2– Attach to Process Debugging

Using Visual Studio you can attach to an instance of your browser that has a Silverlight application running from the server (IIS). This is very useful especially since unexpected problems can occur once you deploy and run your application on the server; problems that you normally won’t see when you just run locally on your box.

To accomplish this open up Visual Studio.

From the menu select Tools->Attach to process (Ctrl+Alt+P). This will bring up the following dialog.

image

The trick here is to understand what instance of your browser to attach to. With IE, you will see multiple instances of iexplorer.exe. Make certain to select the one that has “Type=Silverlight, x86” (circled red above). A common mistake is to select the instance of IE that has the title of your application in it. This is actually the tab of IE and not the parent IE process.

Once IExplorer.exe is selected click the “Select…” button above and choose code type = Silverlight.

Finally click the “Attach” button process and you are good to go!

Thanks,

–Mike

Leave a Comment