npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-debugger

v1.1.1

Published

A flow debugger for Node-RED 2.x

Downloads

3,308

Readme

Node-RED Flow Debugger

This module is a Plugin for Node-RED 2.x. It provides a flow debugger with the following features:

  • set breakpoints on node inputs or outputs
  • pause the runtime manually or when a message arrives at a breakpoint
  • once paused you can:
    • inspect the queued up messages
    • step forward individual messages
    • drop messages

Installation

Install this module in your Node-RED user directory or via the Palette Manager then restart Node-RED

npm install node-red-debugger

Usage

The Flow Debugger adds a new sidebar tab in the editor. Select it from the dropdown menu.

By default, the debugger is disabled. Click the 'disabled' toggle button to enable it.

The sidebar has two sections - a list of the breakpoints you have set and a list of any messages queued up in the runtime.

Working with breakpoints

With the debugger enabled, when you hover over a node's port a breakpoint indicator will appear. Move your mouse over the indicator and click once - it will turn solid blue and an entry will appear in the sidebar.

If you click on it again, the breakpoint will be deactivated but remain in place (light blue).

Clicking on it again will remove the breakpoint entirely (dotted outline).

You can also deactive a breakpoint using its checkbox in the sidebar, and remove it by clicking the x button.

Pausing the runtime

The runtime will by paused whenever a message arrives at an active breakpoint. You can also manually pause the runtime using the pause button in the sidebar.

Once paused, the flow will show how many messages are queued up at each node input and output. Those messages will also be listed in the sidebar - in the order the runtime will process them.

If you click the step button at the top of the sidebar, the runtime will process the next message in the list. You can step individual messages by clicking the step button that appears when you hover over the message.

You can also delete any message from the queue by clicking its delete button. This will prevent the message from passing any further in the flow.

You can click the play button to resume the flows.

Limitations

  • Due to the way Subflows work, breakpoints on Subflow outputs will be ignored

Roadmap

  • Set conditions on individual breakpoints
  • Allow queued messages to be edited
  • Pause only selected nodes/flows/groups

Development

This plugin has been developed using TypeScript. This means that when running from the source code rather than npm, it must first be built.

git clone https://github.com/node-red/node-red-debugger.git
cd node-red-debugger
npm install
npm run build

This will generate all of the plugin files in the dist folder - which is where Node-RED will expect to load the files from.

Then, in your Node-RED user directory (~/.node-red) run:

npm install `<path to node-red-debugger directory>`

Themeing

The Debugger sidebar will use the active Node-RED theme. For the breakpoints drawn within the flow workspace, the following CSS variables will be used if they are set by the active theme.

  • --red-ui-flow-debugger-breakpoint-fill
  • --red-ui-flow-debugger-breakpoint-stroke
  • --red-ui-flow-debugger-breakpoint-active-fill
  • --red-ui-flow-debugger-breakpoint-active-stroke
  • --red-ui-flow-debugger-breakpoint-inactive-fill
  • --red-ui-flow-debugger-breakpoint-inactive-stroke
  • --red-ui-flow-debugger-breakpoint-label
  • --red-ui-flow-debugger-breakpoint-label-active