title: Debugging JavaScript errors in Internet Explorer on Vista with UAC enabled
body: <p>Consider the following trivial HTML page that throws an error:</p>
  
  <pre><code>&lt;html&gt;&lt;head&gt;&lt;script&gt;
    throw new Error('oops');
    alert('should not reach here');
  &lt;/script&gt;&lt;/head&gt;&lt;/html&gt;
  </code></pre>
  
  <p>The user I am logged into Vista with is a member of both the Administrators and Debugger Users groups.</p>
  
  <p>If I run Internet Explorer on Vista as an administrator (right click &rarr; <strong>Run as administrator</strong>) and load the page I get the following error prompt:</p>
  
  <p><a href="https://i.stack.imgur.com/pIdR1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pIdR1.png" alt="alt text"></a></p>
  
  <p>Clicking Yes displays the following prompt from which I can successfully open Visual Studio 2008 and debug the problem:</p>
  
  <p><a href="http://img227.imageshack.us/img227/9751/debuguy3.png" rel="nofollow noreferrer">alt text http://img227.imageshack.us/img227/9751/debuguy3.png</a></p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p><strong>How can I successfully debug JavaScript with Visual Studio when running Internet Explorer with UAC enabled?</strong></p>