Fun Infused Games  |   Smooth Operator RSS 

  Home   |    Archive   |    Subscribe   |    Search   |    About
Posts prior to 8/2/2010 may be missing data. If you need one of those posts, please contact and I will try and recover/find it.

Easy JavaScript Debugging With Visual Studio
Date 6/13/2008    Tags Web, Visual Studio    (0)

A couple of days ago, I ranted on how difficult it was to debug JavaScript in your applications. I'm going to have to take that back though, I discovered something today that makes everything super simple.

First things is first, you must uncheck "Disable script debugging" from the Advanced tab in your Internet Options.

Then go into the JavaScript code that you'd like to debug and add the keyword "debugger" to where you want to start your debugging from.

Now when you run your application and your JavaScript is called, you'll get sent back into the Visual Studio debugger and you can step through code, set breakpoints, etc, just like you were debugging server-side code.

Another nice feature along with this debugging is that it brings up a view of how the source code for your page looks and makes it easy to check values of controls on the page. I can see this as hugely beneficial when it comes to creating customized AJAX applications.

I really wish I had known about this earlier, it would have saved me a ton of headaches. Hopefully this blog post will save others the pain I so needlessly endured. The issues I talked about in my previous blog still apply to trying to debug from IE, but using this method you debug right out of Visual Studio itself (I tested this on Visual Studio 2005, I can't say for certain which other versions it works on or if it works the same on them).

I should also credit the page where I found this info, which you can find right here. Thanks Steve! 0" style="disp

This article has been view 625 times.


No comments for this article.

Add Comments

Name *
  Name the animal in the picture below:

Comment *
Insert Cancel

Xbox (1)  C# (14)  Visual Studio (1)  Cool (2)  iOS (3)  PC (1)  Rant (50)  Sports (11)  XBLIG (32)  Abduction Action (1)  Design (2)  Fin (1)  Volchaos (11)  VolChaos (1)  Nastier (4)  Game Dev (11)  Abdction Action! (1) (18)  Nasty (34)  SQL (1)  XNA (40)  World of Chalk (2)  Video Games (7)  Web (19)  Abduction Action! (27)  Hypership (28)  WP7 (8)  Advise (14)  FIN (20)  Trivia or Die (3)  Development (13)  Absurd (2)  Trivia Or Die (1)