23

I think that Visual Studio's biggest let down is the Javascript editor. I have been told to use Aptana as an editor for my javascript files, but I would prefer to stick with visual studio if possible.

I have read other similar plugin posts, but none focus specifically on Javascript.

VS2010 may offer some improvements, but will they be up to Apatana standards? I have briefly tested the beta, but I'm not overly impressed.

Is there anything out there that will bring Javascript closer to c# development? Considering the wide spread use of Javascript I think there must be something....... I hope! :)

Many thanks in advance... this is something that has always bugged me!

2
  • I find Javascript support in VS rather great (version >= 2008), because we get full Intellisense support that really helps developers Oct 26, 2009 at 21:54
  • I agree the intellisense has improved, but I'm really looking for that improves the overall coding exerpience. For example, simple brace and bracket highlighting would be a great benefit.. especially when using jQuery Oct 27, 2009 at 11:09

5 Answers 5

18

There's a couple recent plugins that may be helpful :

From Microsoft :

JScript Editor Extensions

  • Brace Matching
  • Outlining / Cold-folding
  • Current Word Highlighting
  • IntelliSense Doc-Comments Support

JSEnhancements

  • Outlining and matching braces highlighting

(I wouldn't think installing both of these is a good idea - and the Microsoft plugin has more features so try that one first)

1
  • The Javascript files I usually work on have the extension .sj instead of .js. They are produced from TestComplete. Is there a way to get syntax highlighting anyway?
    – Michael S.
    Feb 1, 2012 at 15:33
5

VS is a pretty good IDE (especially when coupled with Resharper) but not so hot with Javascript. The debugger is good and there's the JSLint plugin but other than that I'm not sure. Aptana (based on Eclipse) is an excellent javascript IDE but it doesn't like it much when the javascript is embedded in aspx files (unless they updated the support recently). So far I'm not sure there's an ideal .net platform IDE for both client and server side stuff just yet.

Update: Resharper 6 added pretty good JavaScript support - so now I'd recommend that combination if you're doing a lot of debugging across client and server at the same time. If you're focussing on pure client code then I find WebStorm to be an excellent JavaScript/HTML IDE - even better than Aptana.

4
  • 1
    Nothing beats Firebug debugger, because swiching from browser to IDE is just plain dumb. Firebug debugs in place where you can also see immediate results without frozen/blank windows. Oct 26, 2009 at 21:55
  • 5
    Firebug is good for debugging javascript but I think littlechris is looking for something to write javascript in, not just debug it.
    – Fermin
    Oct 27, 2009 at 10:23
  • +1 Thats exactly what I'm looking for Fermin. To improve the JS coding experience within Visual Studio Oct 27, 2009 at 11:10
  • One benefit of Aptana is that you can use the firebug debugger (it'll pick up break points you set in Aptana).
    – FinnNk
    Oct 27, 2009 at 16:41
3

I'd really like to recommend Webstorm. It does not! treat your JS as text files.

Its a full blown JS editor and has become my favourite JS editor working in parallel with VS to handle my server side stuff.

  • WS has actual object intellisense across JS files. That means when I press . (dot) it shows me the functions on that objects, even if its located physically in another file.

  • It will recognize my objects (or their type if you will) created in other JS files referred to in the file I'm working on.

  • I have 'Find usages' on JS functions

  • I have 'find all references' on JS object / function / class / variable or whatever you want to search on. In the end its all objects but Webstorm knows this.

  • If I change the short/cut to F12, I can press F12 on my function call and it will jump to the implementation of that JS functon. Even if its located in another file.

  • Ofc. you have code folding and colouring, extract method and other neat code re factoring, overview creating tools.

Oh. And by the way. I'd like to kill off a rumour going around in the cloud on forums I come across from time to time, looking for better ways to handle JS.

reSharper DO NOT SUPPORT JAVASCRIPT! A little piece of me dies every time I read some guy repeating what he saw on the reSharper site. It may have a some poor intellisense and some low level syntax check, but that has nothing to do with support. Notepad++ supports JS better than VS in my opinion.

Münster

1

Don't forget to grab Chirpy to handle minifying your scripts in VS.

0

If you use Visual Studio, add the

 /// <reference path="myOtherJsFile.js" /> 

directive at top of your js files and install Web Essentials you get pretty decent (but not perfect) intellisense, go to definition by using F12 and find all references (sort of..) by using SHIFT+F12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.