title: Working with javascript in VIsual Studio
body: <p>To work with JS files in Visual Studio 2008, I did:</p>
  
  <pre><code>Tools -&gt; Options -&gt; Text Editor -&gt; File Extensions
  </code></pre>
  
  <p>and added js extension with <em>Script editing</em> experience.</p>
  
  <p>That works pretty much as expected apart from the following things:</p>
  
  <ol>
  <li><p>Syntax highlighting is set-up extremely slow (after 10 seconds or so) when I open the JS file. The compiling warnings are generated equally slow and they disappear slowly when fixed. Generally, not a big deal, but I wonder why. Until the file is syn highlighted, you can't put in breakpoints.</p></li>
  <li><p>Intelisense works, but not always. For instance, if I use getElementById to get the element, intelisense with that element doesn't work. I guess it has to do with context, as the compiler can't determine what kind of object is in question. It also doesn't work inside an html page using the script tag, but in this case syn highlighting is immediate.</p></li>
  </ol>
  
  <p>If there is any better approach?  </p>
  
  <p>I am currently opting to use an external editor and to launch it by adding a custom "open with" action on js file. However, I don't like doing this because I can't use the fantastic VS debugging capabilities...</p>