Fun Infused Games  |   Smooth Operator

  Home   |    Archive   |    About
Posts prior to 8/2/2010 may be missing data. If you need one of those posts, please contact kriswd40@yahoo.com 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.


Comments

No comments for this article.


Add Comments

Name *
Website
  Name the animal in the picture below:

*
Comment *
Insert Cancel
Things To Click


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