BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Node-RED 2.0 Improves Developer Experience with New Flow Debugger and Flow Linter

Node-RED 2.0 Improves Developer Experience with New Flow Debugger and Flow Linter

This item in japanese

Bookmarks

IoT-focused low-code programming tool Node-RED reaches version 2.0, bringing flow debugger and flow linter to help programmers find bugs in their flows.

Node-RED 2.0 has mostly focused on removing support for older versions of Node.js and update a number of internal dependencies. Still, the new flow debugger and flow linter, both available as plugins, will be a welcome addition to most developers.

Node-RED flow debugger allows you to set breakpoints on node ports, so your flow will stop each time a new message is received on that port. This makes it possible to inspect all the messages that are queued and waiting to be processed. You can also execute the flow one message at a time, or delete a queued message. This possibility is especially relevant since Node-RED went async a couple of years ago, thus making the relative order of message handling less intuitive.

At the moment, the flow debugger does not support conditional breakpoints nor editing queued messages, but both features are in the works. Likewise, it is not currently possible to pause only a subset of nodes, but it will be in a future release.

Node-RED flow linter, called nrlint can be used to identify potential problems in a flow. nrlint uses a set of rule to identify potentially incorrect uses, such as leaving the output of an HTTP In node not connected to any HTTP Response nodes. nrlint can also be integrated with eslint, which can be useful in case your flow includes custom JavaScript code.

The Node-RED linter uses a browser Worker thread and provides its results in a separate sidebar, allowing you also to quickly navigate to the areas of your flow that need attention. nrliter can be alternatively run from the command line to integrate the linting step in a CI pipeline.

Still on the developer experience front, Node-RED 2.0 replaces its code editor ACE with Monaco. Monaco is the editor engine that powers Microsoft Visual Studio Code and will make all Visual Studio Code developers feel at home in Node-RED 2.0. Monaco is enabld by default, but user can switch back to ACE it they require so.

Other notable improvements to Node-RED 2.0 include a new node-red admin init command to easily create a correctly configured settings file; improved support for calling external modules from Function nodes; the Report By Exception (RBE) node, used to discard messages when their data has not changed, is now part of the default palette and has been more meaningfully renamed to Filter; and more.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT