Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging Silverlight in Visual Studio 2010

I have an MVC application which uses a silverlight control.

Somewhere along the line something is happening in the silverlight cs code that isn't right. I've inserted break points in the CS silverlight code to get a better idea of what's happening, but for some reason I just can't step through the code.

I know code is being hit, but it's just not showing me in the debugger.

I thought it might be because I was using Chrome as the default browser but I changed this to Internet Explorer and still no joy.

I realize this is a very vague question, but has anyone else experience anything similar, and if so, how did you get around it?

Any help would be appreciated,

Thanks.

like image 237
109221793 Avatar asked Jun 02 '11 14:06

109221793


People also ask

How do I Debug Silverlight?

Right click on Silverlight project and select Debug tab from the project properties. Select "Out-of-browser application" radio button to enable Out of Browser debugging. Right click on Silverlight project and select "Set as Startup project". Once all configurations are completed run this application.

How do I enable debugging in Visual Studio?

In the Visual Studio toolbar, make sure the configuration is set to Debug. To start debugging, select the profile name in the toolbar, such as <project profile name>, IIS Express, or <IIS profile name> in the toolbar, select Start Debugging from the Debug menu, or press F5.


2 Answers

Be sure to set the Silverlight Debugging checkbox on the project properties Web tab

like image 72
Noah Avatar answered Sep 19 '22 20:09

Noah


If Chrome is your default browser and your breakpoint tooltip shows this message:

"The breakpoint will not currently be hit. No symbols have been loaded for this document"

... then it is possible the debugger attached to the wrong Chrome process at debug startup. A work-around is:

  1. Start debugging your Silverlight app. Your app should be running in Chrome.
  2. From the Debug menu, select Attach to Process...
  3. Scroll through the available processes and locate the chrome.exe process that shows the type as 'Silverlight x86'.

  4. Select that process and click Attach.

like image 35
Ervin Czimskey Avatar answered Sep 19 '22 20:09

Ervin Czimskey