Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging silverlight application problem

My VS2010 doesn't stop at breakpoints inside of silverlight application. It appears that no symbols for it have been loaded during debugging. When I hover over the break point it says "The braekpoint will not currently be hit, no symbols have been loaded".

I have tried all of possible solutions offered by google and have no success. The problem occurs even when I create brand new silverlight app hosted by an ASP .NET web project. All of my project configuration looks fine - silverlight debugging is enabled in the Web project.

I am using silverlight 4. here a link to the sample project created out from the tepmlate.

Any thoughts ?

P.S I just tried to reinstall VS2010 and the problem still exists.

EDIT: I just tested the same project on another machine and it stops at the break point it seams that the problem is somewhere in the configuration of VS or silverlight.

with Matt Dotson's help I managed to attach the debugger manually. However this solution is not good enough for daily use.

like image 884
Koynov Avatar asked Jun 30 '10 08:06

Koynov


2 Answers

Depending on my experience in Silverlight following these steps keep your project debug-gable.

Condition 1>

Firstly we need to be ensure that in Web Project's properties there is a Web section, as you see below Silverlight checkbox must be checked.

enter image description here

Condition 2> Follow In Menu Debug => Attach Debugger>

Visual Studio sometimes can't attach debugging platform you need to lead the way :) . By this way you may debug other platforms,(also you may debug your product platform but pdb files must be sync and don't forget you may suspend your product platform using this).

enter image description here

Condition 3> Your default web browser may be Firefox,Chrome or other than IE.By Visual Studio default try to attach to IE. But when you run VS calls default browser,so you need to have a manual attachment in Condition 2 or set your default browser by right clicking on default page > Browse with .

enter image description here

Condition 4> There is xap file generally located in web project\ClientBin directory. Sometimes after build operations this file can't be replaced and your ProjectDll and your Project PDB files not be sync. This cause wrong line match while debugging or can't find a debugging file attached caution. I strongly suggest delete all generated files in Bus project and delete Clientbin\ProjectName.xap file. After rebuild all it must be ok!

enter image description here

Hope helps.

like image 138
Davut Gürbüz Avatar answered Oct 12 '22 11:10

Davut Gürbüz


What broswer are you using? You need to be using Internet Explorer to debug silverlight projects.

like image 20
Donal Avatar answered Oct 12 '22 09:10

Donal