How can a silverlight app fail with no errors?
I've ran into this scenario a few times now开发者_如何转开发 and I cant explain it. Basically I will have a small error in my app, like a reference to a style defined in a resource dictionary that doesn't exist anymore or an image that doesn't exist.
My app will compile and run up to the point of the silverlight loading screen (little blue cirle progress bar) but the app will never load. No errors are thrown, silverlight debugging is turned on, and it just never loads.
9 times out of 10 its easy to evaluate what you changed since the last build and find your mistake, however I've run into scenarios where someone checked one of these changes into source control and I have no leads as to whats breaking our project.
So my question is how can my app fail so miserably with no obvious way to find the source of the problem ?
There is an empty catch in the SL error throwing code to not crash your broswer, if you are reaching that point you may:
1) test in other computers 2) test in a browser with a good dev console (webkit, firebug) to catch any JS errors.
One thing I've found is that often an error message is output when there's no other sign that anything's wrong.
Run from within Visual Studio and keep an eye on the debug output window. Check for any extra messages you're not expecting.
精彩评论