Node.js is a platform for building fast, scalable applications using JavaScript. It’s making its way just about everywhere – from servers, to Internet of Things devices, to desktop applications, to who knows what next? And now, with Node.js support in Visual Studio, it’s easier than ever before to develop Node.js applications.

Node.js, meet Visual Studio

We’ve had NTVS under development for well over a year now. Some highlights of this release include:

Code completions? For a dynamically typed language? Yep, you heard us right. NTVS will statically analyze your project to provide you with syntactically-correct code completions for your Node.js code and packages.

Interactive Window (REPL)

For the uninitiated, REPLs are awesome. Write some code, and see the results inline. It really speeds up the process of experimenting with code, or exploring a new package. And of course, we’ve gone a step further and sprinkled the experience with some Visual Studio magic – you’ll get full syntax highlighting and completions, just like you do in theeditor.

npm Integration

Explore and manage your npm dependencies in Solution Explorer, search for and install dependencies from the npm registry in the rich UI, and hop into the interactive window or command prompt for everything else. The end-to-end npm integration makes working with your dependencies easy – NTVS will even warn you when one of your dependencies is missing.

Advanced debugging and profiling

We’re always shocked to hear how many people are relying on print-line statements to debug their Node.js code. With NTVS, you can enjoy stepping through your code with breakpoints and automatic exception notifications. Advanced features include conditional breakpoints, tracepoints, hit counts, and edit-and-continue.

But a lot of my issues occur on my production server! What if I’m not deploying to Windows? Or Azure?

Sad times for the Windows/Azure teams… That’s okay, though, because NTVS has you covered with remote debugging to any OS (Windows/Linux/MacOS).

Oh no! My code! It’s so slow! What ever shall I do?

NTVS takes advantage of V8 profiling API’s and Visual Studio’s reporting features to give you a sense of where your program is spending its time so you can quickly track down performance issues.

Unit Testing

Integration with Visual Studio’s test explorer means that you can author, run, debug, and filter unit tests without having to switch to a command prompt. Use mocha, or simply extend Visual Studio to work with your favorite unit testing framework.

And much more…

But wait, there’s more! Here’s a quick pass through the remaining features:

Project templates to get you up and running in an instant.

TypeScript lovers, rejoice – all the awesome features we’ve described apply to TypeScript as well.

We’re Moving to GitHub!

[UPDATE April 2015]: You asked, and we listened! Node.js Tools for Visual Studio is moving to GitHub. With the Node.js and JavaScript communities already on GitHub, the move just makes sense. We are thrilled to contribute to and be a part of the vibrant community on GitHub and we look forward to seeing you all there. We might experience some hitches along the way, so thank you for your patience as we take this next step!

Questions, compliments, complaints?

NTVS is a free and open-source project that’s been developed with the help of the community from the start. File an issue, request a feature, post in our forums, or send us a carrier pigeon – your pick. We’d love to hear your feedback, especially if it comes in the form of a pull request. 🙂

Thank you, thank you, thank you to all the incredible people who have already contributed. We should all be proud of the product we’ve built together.

Sara is a developer on Node.js Tools for Visual Studio. At first, she was skeptical about Node.js – that is, until she realized its full potential… Now, she’s all in, and excited to help it take over the world by bringing the power of Visual Studio to the Node.js community. She, for one, welcomes our new JavaScript overlords. 🙂

REPL is really the state of the art? Wow, I'm going back to my childhood (I'm 47).

Have you ever seen Smalltalk's GUI, now that's freaking awesome. REPL is software archaeology by comparison.

We've all still got so much to learn from Smalltalk.

4 years ago

Richard Szalay

Congratulations guys, it's been a long time in the making!

What's the word on the max path issues? I've never been able to get NTVS to work on a real world app since gulp (among others) have dependency chains so deep they trip up the max path issue. I don't see the same problem when working with the node command line directly.

Is that still a "thing" or have all the dependant VS APIs been updated to use the //?/ prefix (don't get me wrong – I have no doubt it's that simple)

4 years ago

pcunite

Excellent news. JavaScript is very important. Take the sting away for us!

4 years ago

MarcoMedrano

Hi @Sara Itani first of all the tool is very very cool, glad to have the development and debugging experience back in VS. Have 3 questions:

1 Is there a way to use those features in other project types besides NodeJS? I guess it will perfectly work for debugging js unittest in other project types like ASP, Web, etc.

2 Is there a way to make work the 'Node.js Interactive Window' with the current debugging context? I mean if you are debugging and you have a breakpoint after 'err.status=404;' then in the window type 'err.status' the window should print 404 as well as provide auto-complementation. In the normal 'Interactive Window' it prints that but is very poor, in functions does not print the function, does not provide auto-complementation neither syntax's colouring. Something else in your window when you press 'Enter' it breaks down the line if the caret is not at the end of the sentence, but we are custom to make execute the line, that works in chrome and 'Intermediate Window', if we want to break down the line we usually press 'shift+Enter'.

3 Are there plans to provide this fantastic debugging features to client side? I mean be able to debug client code. I know it is possible right now with IE, which work for really small projects then it stop working or debugging is not accurate or breakpoints are not hit.

4) groan very loudly when it happens – no good keeping those emotions bottled up 😉

luckily #1/#2 cover most cases (including gulp)

With regards to the technicalities of max_path itself… the issue is with the .NET file I/O API, which doesn't allow you to use \? paths to work around it, and is too big for our team in particular to do much about. Here's a good article that might provide a little more context (it's a little old, and these "plans" they speak of never actually materialized.)

That said… we don't like it either, and we are still thinking about what we can do.

@MarcoMedrano

1 – You can use the interactive window for node and npm (global commands only for npm… though make a feature request – I don't think it would be all that hard to enable it everywhere else too.) We do not enable NTVS on other project types because things would get pretty hairy with all the additional scenarios we would need to support. But if you think there would be a lot of value, feel free to file an issue elaborating on the scenarios you're interested in. If there's enough interest, we might be able to get a partner team to help out.

2 – During debugging, you can use the "Immediate Window", but it will not provide code-completion. We have a feature request for a debug interactive window here:

Thanks for reporting this… it looks like the CodePlex issue tracker went down. Allow me to explain what's going on. When you create your application, the analysis engine starts analyzing your project so that it can provide completions. On my computer using repro steps you described, the cpu was churning and memory growing for roughly 12 minutes. After these 12 minutes passed, I witnessed the same symptoms you did – around 2.1gb of ram being taken. However, if you start working on other operations, you'll notice that the garbage collector will eventually kick in, and the overall memory usage will drop to 1.5 gb (for instance, try opening up and closing the npm install dialog – we happen to force the garbage collector to collect upon closing that dialog.) Does that help clarify things a bit? Are you experiencing any issues other than the high memory?

3 years ago

Mars

Hello,

Your solution work by closing the npm windows. My memory drop to 2.1Go to 1.2go !
Do you will a fix for the next update?
Thanks

4 years ago

Richard Szalay

@Sara I'd certainly be interested in getting the analysis engine long path friendly. Do you think there'd be value in doing so with out the other areas? Let's continue the conversation via email – my address is firstname@firstnamelastname.com