debug

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Debug node

Type: debug
Category: Debug

Displays the message payload in the debug panel.

Behavior

This node is registered as debug and runs as part of a workflow. Its exact runtime behavior is implemented in node.go; this document summarizes the editor-facing purpose and configuration contract.

Configuration

Field Type Default Description
active boolean true Active — false mutes the node — deployed but emits nothing
complete string payload Output — payload (or empty, and Node-RED's legacy "false"): the message data · true: complete msg object incl. metadata · any other string is a msg. (e.g. "topic" or "payload.user") · with targetType "jsonata" it is a JSONata expression evaluated against the message.
console boolean false Also Print to Console — Print the formatted value to stdout as well
statusVal string Status Value — Optional property path ("payload" or a dotted path) also shown as node status text
tosidebar boolean true Show in Debug Panel — false suppresses the debug-panel event (Node-RED tosidebar)

Implementation

  • node.go contains the executor, validation, schema, and registration.
  • editor.html contains the editor integration.
  • node_test.go, when present, contains behavioral tests.

Documentation

Overview

Package debug contains the debug node implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DebugConfig

type DebugConfig struct {
	// Active toggles the node; false means deployed but muted (no events)
	Active *bool `json:"active"`
	// Console also prints the formatted value to stdout. Node-RED
	// serializes this as a string ("false") in some exports — flexBool
	// accepts both spellings.
	Console flexBool `json:"console"`
	// Complete selects what is displayed: "payload" (Data only),
	// "true" (the whole payload including Metadata) or "false"
	// (a bare marker, Node-RED's "node name only" behaviour)
	Complete string `json:"complete"`
	// StatusVal is an optional property path whose value is also
	// reported as the node's status text (emitted as an extra event)
	StatusVal string `json:"statusVal"`
	// Tosidebar mirrors Node-RED: false suppresses the debug-panel
	// event entirely (console output is unaffected). Default true.
	Tosidebar *flexBool `json:"tosidebar"`
}

DebugConfig holds configuration for the debug node

type DebugNode

type DebugNode struct {
	*nodebase.BaseNode
	// contains filtered or unexported fields
}

DebugNode passes the payload through unchanged; the formatted debug value is emitted into the workflow event log by the host so it shows up in the editor's debug panel (Node-RED debug node)

func NewDebugNode

func NewDebugNode(node nodestore.NodeInterface, config *DebugConfig) *DebugNode

NewDebugNode creates a new debug node

func (*DebugNode) Execute

Execute passes the input payload through unchanged

func (*DebugNode) PostRunEvents

PostRunEvents implements RunEventer: the debug node emits the formatted message value into the event log so it renders in the editor's debug panel; console=true also prints it to stdout, and a configured statusVal is reported as an extra "status" event. active=false mutes the node entirely.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL