The Engage Weblog

Debugging JavaScript on Internet Explorer

by bdukes on Thursday, May 17, 2007 12:53 PM
If you're anything like me, you've been greatly looking forward to Visual Studio Orcas, with its enhanced support for JavaScript.  You might also not know that some of that functionality is available to us currently in Visual Studio 2005.  It's not exactly easy to setup and use, but once you get it going, it can really help out when you're trying to figure out why, for example, all elements on your page suddenly disappear, only in IE.

Using this Knowledge Base article as a starting point, http://support.microsoft.com/kb/816173, I was able to get up, running, and debugging.  The first step is to enable debugging from Internet Explorer, by unchecking the "Disable Script Debugging (Internet Explorer)" box in IE's Advanced Options.  Then, in order to actually set a breakpoint and step into your javascript code, you'll need to use the debugger keyword in your code.  Just put that statement in your script wherever you would like the debugger to break, and...

JavaScript Basics

by bdukes on Monday, May 07, 2007 3:07 PM
Working on web sites, I've come across the need, more and more, to be using JavaScript to make an application run more smoothly.  Unfortunately, I have absolutely no training in JavaScript, which means most of what I write does the job, but misses a number of the essentials.  Fortunately, there is hope.  If you, like me, didn't know that JavaScript objects are dictionaries, or that JavaScript inheritance is between objects, not classes, you should check out Ray Djajadinata's article for MSDN Magazine, Create Advanced Web Applications with Object-Oriented Techniques in JavaScript.  It really helped me to understand some more of all of this JavaScript craziness that I always saw but never understood.

...