Not a subscriber?

Join thousands of others who are building self-directed lives through creativity, grit, and digital strategy—breaking free from the 9–5.
Receive one free message a week

Debugging Silverlight Tip

If you’re doing any kind of Silverlight work you’re bound to get “Error on page” in Internet Explorer. Here’s what I’m talking about.

You fire up your app in the browser window and BLAM. Screen is empty and you get the “Error in page” error. Double click the error and you get an Internet Explorer JS Error Window. Here it is in all its glory:

 image

 

How Do I Catch The Exception in Code?

The exception IS happening in code you’re just not catching un-handled exceptions.

To turn them on, go to Debug –> Exceptions:

image

You’ll get the window below. Check the “Common Language Runtime Exceptions” checkbox and click OK.

image

 

You will not get exceptions bubbled up to the Dev Environment. Here’s what it looks like in action  (with the same error as the “blank screen” above).

image

 

Click “Break” and break into the area where the code barfed on you, and then clean up the mess you’ve created (on accident of course – who creates un-handled exceptions for fun anyway). 🙂

 

Enjoy.