BlockLeftTop, PRELOAD BlockLeftBottom, PRELOAD BlockLeftStretch, PRELOAD BlockTop, PRELOAD BlockBottom, PRELOAD BlockStretch, PRELOAD BlockRightTop, PRELOAD BlockRightBottom, PRELOAD BlockRightStretch, PRELOAD
DeltaEngine

Debugging Silverlight in Visual Studio

by Benjamin Nitschke 8. June 2007 10:46


Couple of tips if you want to debug Silverlight applications in Visual Studio. Please note I have not worked myself with Silverlight much, I was just observing my colleagues and helping them out when they were unable to debug their Silverlight code.

  • First of all: Visual Studio 2005 is NOT supported, you need Visual Studio Orcas Beta 1 (see my last 2 posts about it)

  • You need the VS_SilverlightTools_Alpha_Setup.exe setup file to get started with silverlight and allow debugging

  • The XAML designer view never seems to work and it usually does not even show up. If you want to hide it, switch the design and xaml views and then click the button on the very right to hide the design view on the bottom.

  • Most importantly: If debugging does not work for you make sure that:

    • Close ALL your instances of Firefox and Internet Explorer first. Then start the debugger of VS Orcas with F5 and let it create a new instance of your browser. This is VERY important because if you leave the browser open and start to set some breakpoints and debug the application, it won't work. Every time you press F5 in VS Orcas to start the project a new browser instance must be created, else debugging is just skipped and you just see the website, the debugger ends immediately. I tested it with Internet Explorer first, but Firefox is ok too if you can live with the constant opening and closing. For me it is much more comfortable to use Firefox for browsing and then Internet Explorer for testing the Silverlight stuff.

    • Your project/website/etc. does not contain any spaces. Like the .NET 3.5 installation there are still issues with spaces. Just make sure there are none. This wasn't a problem at my PC, but on a Vista machine it caused problems.

    • Exceptions seem to be ignored and there seems to be some Exception-Eating-Monster in the Silverlight runtime because no matter what happens or what you throw, it will not be passed to the debugger. Instead it just seems to end the debugging session and shows the page as far as it got. It is probably best to catch all exceptions yourself and display them in some label or flush them to a log file ..

Comments


6/8/2007 11:59:58 AM #

Thanks for the tips!  I am just getting into Silverlight myself.  I was curious if you knew how to disable Internet Explorer's extremely annoying ActiveX blocker?  I have tried every enabling every possible setting(except phishing/pop-up blocker) and it *still* gives me the info bar pop-up and a modal window I have to click if I want to debug a Silverlight app from VS Orcas.  I have gone to debugging with Firefox, even though I have to paste the file path manually every time, because IE is so annoying.

Obsurveyor | Reply



6/16/2007 3:07:51 PM #

Hmm, I had not that problem. I'm still using IE6 at my dev machine for backward compatibility reasons and I set the security as low as possible until all those issues disappeared. I guess you can also change the setting from asking you to accept all the times in ie->tools->options.

abi | Reply



4/1/2010 11:10:16 AM #

Set your goals high, and don't stop till you get there.

acai berry select | Reply



4/18/2010 1:28:19 PM #

I’m impressed, you know what you’re talking about

us | Reply



4/18/2010 4:25:11 PM #

Nice post thanks.

us | Reply



4/26/2010 7:44:17 PM #

Keep your thinking right and your business will be right.

payday loans | Reply



4/27/2010 11:10:31 PM #

I\'m happy I found this blog, I couldnt discover any info on this subject matter prior to. I also run a site and if you want to ever serious in a little bit of guest writing for me if possible feel free to let me know, i\'m always look for people to check out my site. Please stop by and leave a comment sometime!

Rapidshare | Reply



5/4/2010 4:57:01 PM #

Top Rapidshare Search engine

Rapidshare Search engine | Reply


Add comment




biuquote
  • Comment
  • Preview
Loading



Disclaimer: The opinions expressed in this blog are own personal opinions and do not represent the companies view.
© 2000-2011 exDream GmbH & MobileBits GmbH. All rights reserved. Legal/Impressum

Poll

Which platform should Soulcraft be released on next?











Show Results Poll Archive

Recent Games

Soulcraft

Fireburst

Jobs @ exDream

Calendar

<<  May 2012  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910