Debugging silverlight application problem

后端 未结 7 2143
盖世英雄少女心
盖世英雄少女心 2021-01-01 16:57

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 po

相关标签:
7条回答
  • 2021-01-01 17:13

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

    0 讨论(0)
  • 2021-01-01 17:22

    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.

    0 讨论(0)
  • 2021-01-01 17:24

    The resolution came after 2 days of headbanging. It appears that the link which Malcolm gave covers exactly my problem but my I was narrow-minded enough not to pay it enough attention because when I run the debugger as long with the app my default browser was FF. So I thought that after the FF starts I can load the page from IE or Chrome.

    Actually the problem is that the debugger cannot be attached to the silverlight project because of the FF. And when I load the app from IE or Chrome the debugger dis still not attached.

    Thanks to everyone that tried to help.

    0 讨论(0)
  • 2021-01-01 17:26

    I have had a similar frustrating experience with this but in my case the solution was very simple. It seems that somehow, and I really have no idea how, the debugger option for Silverlight had become unchecked in the properties on the hosting ASP.NET project.

    I just assumed that as I had been previously debugging, this option was set and I didn't bother to make sure that this was this case. Just goes to show that one should always check the basics first; if I had done that it would have saved me some time.

    To check this in VS2010, right-click on the project and select properties, change to the Web tab and check the Silverlight option at the bottom of the page, in the debuggers section.

    0 讨论(0)
  • 2021-01-01 17:30
    • Also see the debugger to a silverlight process http://msdn.microsoft.com/en-us/library/cc838267(VS.95).aspx

    If that doesn't work, then

    • reset iis (if you are debugging in that)
    • delete temporary asp.net files (%SystemRoot%\Microsoft.NET\Framework\versionNumber\Temporary ASP.NET Files)
    • clean and rebuild your solution
    0 讨论(0)
  • 2021-01-01 17:32

    if you have multiple project, Rebuild the project separately that you want break point. Its work for me

    0 讨论(0)
提交回复
热议问题