25 March 2011

Javascript Debugger does not work in IE9


As I said previously I had installed Internet Explorer 9 on my computer and I also said you that this was a very BAD idea.

Here is one more reason of why it was a bad idea - my lovely javascript command is not working anymore, I am talking about debugger;

Do you remember in Internet Explorer 7 and 8, am not sure about IE6 (I vague remember, but I think debugger was working in IE6 too), that when you put debugger somewhere in the code IE opens a popup with the message: "An error has occurred. Do you wish to Debug?", or something like that. After what you can press YES and you then can select the application with which you wish to debug your page.

For me the above behavior was something which helped me a lot.

Now with IE9 the problems starts the keyword - debugger - DOES NOT DO ANYTHING.
What is that? Why?

I have found on some forums that those from Microsoft just wanted to provide to the end user a better experience when surfing on the internet, but why couldn't they create a setting, a checkbox where we developers could say: Please throw me all errors from the page, I need to see them.

My opinion is when those from Microsoft can not fix something then they just exclude that future from the final product.

They could at least do the same as on Chrome, Safari or Firefox - when Developer Tool / Firebug is opened and there is a debug keyword anywhere then stop at that line.

As a workaround for this in IE9 you can do the following steps(too many steps):
1) Display Developer Tool - F12;
2) Select Script Tab
3) Start Debugging
4) The page will reload automatically from cache and will stop at any error, breakpoint or debugger keyword on the page.

Then when you are in debug mode, please note - in IE debugger application, but not Visual Studio or other IDE, you are able to use the step buttons, the console, the call stack and locals tabs to inspect your code and variables values.

I don't know how is it for you but this is very inconvenient for me.

What are your thoughts about that?


Anonymous said...

Works for me, try Tools, Internet Options, Advanced, Uncheck Disable script debugging (Internet Explorer).

Roman Gherman said...

Thanks for visiting my blog.
I haven't tried your suggestion yet, but is there a Microsoft's article about that?

Or it is just your findings?


Anonymous said...

Debugging doesn't work for me too in IE9.

Have enabled all the relevant options such as "Unchecked Script tag".

Please help me!!

Roman Gherman said...

Have you tried as suggested by somebody in first comment: Uncheck Disable script debugging (Internet Explorer).

I that still doesn't help then follow the steps described in the blog:

F12 -> Script Tab -> Start Debugging

and debug through IE debugger.

Post a Comment

your thoughts are welcome:

Need more? Leave comments and subscribe to my blog.