Monday, June 27, 2005

Error: Object expected

If you play nice with javascript (lately aka AJAX) in you every day life as a web developer I bet your 8 hours salary that you get lots of errors, the majority being typos. And if you happen to develop on IE I also bet that you scream for mercy when you see that little devlish exclamation sign icon in the lower left corner of your IE window. Yes, the one that says: "Errors on page" and then quickly replaces that with "Done". What that means is that you're done, cooked, well baked and generally your sanity is done beeing there and just left. Isn't that nice from the boys at MS to monitor your level so accurately. They have the knowhow to do it anyway :)
Shure, you can do what I normally do and use the JS debugger from Firefox to get at least a hint at the nature of the error and the file and line code where it occured. But that doesn't always work.
Yet today I discovered something new, fresh and incredibly unexpected. AFAIKnew you could debug JS in IE only if you had Visual Studio installed. But it turns out that there is a little actually "usefull and free" tool from Microsoft. Introducing Microsoft Script Debugger (trumpets sounding in the background). On the download page just click on "Continue" because it's not what you think. You will not have to validate your Win installation in order to download. Wtf, they already have your entire hardrive's content scanned (muahahahaa).
It's lightweight and appears to be very useful. Just be careful to go to Tools->Internet Options->Advanced-> and make shure that the box next to "Disable script debugging in Internet Explorer" is not checked. It seems that by default script debuggnig is disabled. After you do that and install the debugger you will find the menu entry at View->Script Debugger. You can find additional info about using it here.

Man is this a long post or what!

3 Comments:

Anonymous Dragos Ionita said...

I haven't yet tried the Microsoft Script Debugger, but why not use Firefox ?

It's more standards-compliant then ie is and plus it has an integrated javascript debugging tool (you can even evaluate expressions in a given context)

2:50 AM, July 01, 2005  
Blogger cosmin said...

Don't get me wrong.
I love and use Firefox for every day browsing. And I usually debug my JS using either the JS console or Venkman. The problem is that when developing sites you have to make it work in IE first of all. I know, it's a crule world but IE still holds the supremacy among browsers when it comes to the number of users. And there are issues that need debugging in IE only.
Are you also working in webdev?
How do you manage to stay completely out of IE?

9:44 AM, July 01, 2005  
Anonymous Dragos Ionita said...

Oh yeah, you're right :) I wasn't thinking of this on full scope, plus preferential reading.

One should obviously check the scripts one makes for compatibility on as many browsers as possible.

The debugger microsoft offers is indeed pretty cool, it shows you exactly where the mistake is and it helps you debug :)

Cheers.

10:54 AM, July 01, 2005  

Post a Comment

Links to this post:

Create a Link

<< Home