Javascript – Debugging JavaScript errors in Internet Explorer on Vista with UAC enabled

debugginginternet explorerjavascriptvisual studiowindows-vista

Consider the following trivial HTML page that throws an error:

<html><head><script>
  throw new Error('oops');
  alert('should not reach here');
</script></head></html>

The user I am logged into Vista with is a member of both the Administrators and Debugger Users groups.

If I run Internet Explorer on Vista as an administrator (right click → Run as administrator) and load the page I get the following error prompt:

alt text

Clicking Yes displays the following prompt from which I can successfully open Visual Studio 2008 and debug the problem:

alt text http://img227.imageshack.us/img227/9751/debuguy3.png

If I instead launch Internet Explorer normally and load the page no error prompt is displayed (or any indication of the error for that matter) and I can't jump in and debug the problem.

I've tried making the site the page is served from a trusted site in Internet Explorer. This causes the error prompt to be displayed for the page, but clicking yes doesn't do anything and the browser just sits and hangs.

Similarly I can only successfully attach to an existing Internet Explorer process from Visual Studio to debug JavaScript if Internet Explorer was run as an administrator.

How can I successfully debug JavaScript with Visual Studio when running Internet Explorer with UAC enabled?

Best Answer

Have you gone into the Advanced Options in IE? I think the settings you are looking for are just turned off by default for normal users.

I could be mistaken though, I haven't been working with Vista much.

Edit: Let me rephrase: have you double-checked your settings under the limited account. Sometimes in an attempt to be "helpful" I've see where XP (or it might have been the security software) automatically changes some settings in the limited accounts.

I realize that your Admin account would have those on and that you are surely intelligent enough to check it on the Admin account. I was just suggesting that like many others, you might want to re-check the limited account.