开发者

Random Silverlight 3 problems

I'm experiencing two intermittent problems with Silverlight 3.0, running on Windows 7 with Visual Studio 2008 Standard edition.

  1. My breakpoints will often not be hit, saying that no symbols have been loaded. Often times I can fix this if I stop debugging and try again once or twice. It seems completely random.

  2. Infrequently, my project will get stuck in a state where the Silverlight loading symbol will show 100%, and nothing else happens. It just shows that little circle animation, and my project doesn't start, nor do any breakpoints get hit, again saying no symbols have been loaded. Stopping all browser and ASP.Net development server instances does not help. To fix it the first time I had to reboot the computer, and even then it took one or two run attempts to get it back. I'm about to try that, as right now I'm stuck in the second occurrence.

I just downloaded and installed Silverlight开发者_Python百科 3.0 today, as Visual Studio did not list any Silverlight project templates. First I got the Silverlight SDK, and when no templates showed up, I installed the "Silverlight Tools".

My project is a "Silverlight Application', and when prompted I left the selected ASP.NET Silverlight Application setting (as opposed to an ASP.NET Silverlight Web Site).

Also, I don't seem to have a designer preview window. I don't know if that's related or not.

I'll provide more information as needed.

Update: I tried uninstalling and re-installing Silverlight and the SDK. That didn't help. Nor did creating a new project, selecting web site, and copying my old code in. I was, however, able to get a brand new project, without my old code, to get past the 100% thing, but I don't really see what's wrong with my old code. I'm not really doing anything complex or anything. I'll see if I can find out more, but it'll be rough without a debugger.

Update 2 I think I have it working again. I commented out the main body of code, and re-ran, which worked. Then I put the code back in, and instead of it just sitting at 100%, I got an exception, which I can track down. I don't know if my re-install has fixed my breakpoints or not. I'll report back if it has.


One explanation for your first issue could be you'll often see a lack of debugging symbols loaded (meaning no breakpoints will be hit) if your browser caches the .xap file, rather than loading the newly built one.

The best way to ensure it doesn't happen I've found is to make sure you don't have any tabs open with previous sessions of your app in your browser when you initiate the debug session. In fact the best way altogether is to ensure your browser is closed between each session.

If you do start a debug session and no symbols are loaded, you can verify whether this is the issue you're experiencing by manually clearing the browser cache and reloading the page. Keep an eye on visual studio to see if your break points load while you're doing this.

Regarding the designed window, I'd say not related to the other problems you're having. The designer window is pretty much non-existant in visual stduio 2008. It's much improved in 2010.


I often seen problem 2, though I find that if you click the stop button then refresh the page, the problem goes away.

With problem 1 I've only ever seen that when debugging through something other than IE. The Silverlight debugging story is poor when outside of IE.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜