C# Disciples

my life in Avalon ….

Debug Javascript in a Silverlight application

One very handy feature of Visual Studio 2008 is debugging in Javascript. I beleive that working with javascript in VS2008 has became simply brilliant!

Having said that I was building a silverlight application and I tried to do a breakpoint in my Javascript code and guess what…. It did not work !

Ian Griffths (my Silverlight teacher :D ) pointed out to me that this problem was caused by having Silverlight debugging selected in Visual Studio… So in order to debug Javascript you must go to the website Property Pages -> Select “Start Options” and uncheck the Silverlight checkbox in the Debuggers sectionas shown in the image below

Javascript debugging with Silverlight

If this still is not working for you check your Internet Explorer settings . Basically you MUST have the “Disable Script Debugging” in IE unchecked. To find out if this is set correctly go to the “Tools” menu in IE -> “Internet Options” -> ”Advanced” and you should see it now. This must be unchecked.

kick it on DotNetKicks.com

About these ads

April 3, 2008 - Posted by | javascript, silverlight, silverlight 2 beta 1, silverlight tips and tricks

4 Comments »

  1. thanks a lot!! very useful for me.

    Comment by Torres | April 16, 2008 | Reply

  2. welcome :D

    Comment by marlongrech | April 16, 2008 | Reply

  3. Thank You!!!!!!!!!!!
    It took me 2 hours to find this answer…I can’t believe more people aren’t having this problem?

    But of course you should uncheck Silverlight debugging when your in a Silverlight application. OMG I am actually more angry now that I know how to fix it !#$%#

    Comment by JHerington | September 26, 2008 | Reply

  4. Thanks … this article was very useful … very very thanks

    Comment by Gopinath | January 14, 2009 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 845 other followers

%d bloggers like this: