Over a million developers have joined DZone.

NetBeans Tools for Node.js

DZone's Guide to

NetBeans Tools for Node.js

· Performance Zone
Free Resource

Transform incident management with machine learning and analytics to help you maintain optimal performance and availability while keeping pace with the growing demands of digital business with this eBook, brought to you in partnership with BMC.

Over the last weeks, I wrote a NetBeans plugin for node.js - sources are in NetBeans' contrib repository.

What it gives you:

  • A Node project type
  • Clickable stack traces in the output window
  • A run with node action on Javascript files (and of course, the project)
  • Integration with Node Package Manager (npm) and a slick little UI for adding libraries
  • GUI for editing package.json files, and generating their standard contents
  • Ability to store machine-specific command-line arguments (excluded from version control if you use NetBeans' version control).
  • Ability to download Node's sources so the highlighted stack traces point somewhere
A Node Project in NetBeans
A Node Project in NetBeans

The project metadata is simply the standard package.json metadata which is part of any Node module, so there are (almost) no additional NetBeans-specific files added to a project - and any library you get with npm will also be openable as a project.

The Libraries Customizer
The libraries customizer

The one exception to the no-funky-metadata-files rule is that you can provide command-line arguments to the project. Since these are most-likely machine-specific, they are stored in an .nbrun file which NetBeans knows not to put under version-control.

Library Info - really just JSON-meets-Swing

Basically, I wanted to learn Node.js, and having some decent tools to work with it reduces the headaches - NetBeans already has excellent Javascript editor support thanks to Tor Norbye's amazing work. If you're reading this blog, the server software was written using this plugin - so I'm eating my own dogfood.

The one thing I'd like to get working is code-completion - this may require some hacking of the source indexer - I've been in touch with Tor to try to figure out where to dig to do that, but it may not be a trivial task.

The Node Options Panel
The libraries customizer

How to get it

  • You need a NetBeans Daily Build - from today (June 2, 2011) or later - I had to add some features to some of my other modules, so it will not work with 7.0
  • In Tools | Plugins, it will be in the Available Plugins tab


  • Install Node - there are distros for most Unix-based OS's
  • Install NPM - ditto

You can do without NPM at the start, but it's worth having - it's the world's simplest package manager, and tons of people publish libraries into it - so it's a great source of both useful things and good code examples.

Other Node Plugins

Before anyone asks, I'm aware that Syntea has a plugin that does the first two things on the feature list above. Since it's a Czech company and a NetBeans plugin, I'm guessing it's probably one of my former colleagues in Prague.

I did attempt - by twitter and email - to contact them to see if I could contribute to their plugin, but got no response.

From http://timboudreau.com/blog/read/NetBeans_Tools_for_Node_js

Evolve your approach to Application Performance Monitoring by adopting five best practices that are outlined and explored in this e-book, brought to you in partnership with BMC.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}