Debug
Drop a labeled breadcrumb in the console without breaking the flow
- value
- value
You're debugging a workflow and you need to know, mid-stream, that a branch actually executed - or you want a named marker you can grep for in the terminal while a long run churns. XJDebug is a tiny pass-through node that prints a message to the ComfyUI console and hands your value back unchanged.
It's from the ComfyUI-XJNodes utility shelf, and it's about as minimal as a debug node gets: no popup UI, no file logging, no timestamps - just a colored line in the console. If you've ever added a stray print() to a node's source to figure out what was happening, this is that impulse, made into a node you can drop into any graph without editing Python.
How it works
Execution is two steps: it logs, then it passes through. The log line goes to ComfyUI's stdout (the terminal where you launched it) prefixed with [XJDebug] and colored cyan for visibility - and it includes the text label you set on the node, so you can drop several of these through a graph and tell them apart at a glance. Then the value you fed in comes back out completely unchanged, which means you can insert the node into a data path without altering the result downstream.
The practical value is confirmation and labeling. A node that produces None or a silent no-op can be maddening to trace; put an XJDebug right after it, watch for its [XJDebug] line in the console, and you instantly know whether that branch executed at all and in what order.
The inputs and outputs
value(required, any type) - the thing you want to route (and confirm).text(required,STRING, default"Debug") - your label. Make it specific:"upscale branch ran"beats"Debug"once you have three of these in one graph.- Output:
value(any type) - the unchanged input.
Note text is a required widget here, so unlike the string pass-through, this node is meant to be configured.
Installing it
Part of ComfyUI-XJNodes:
cd ComfyUI/custom_nodes
git clone https://github.com/alexjx/ComfyUI-XJNodes
then restart ComfyUI (or ComfyUI Manager → ComfyUI-XJNodes). No models, no dependencies.
Common issues
The main thing to remember is where the output goes: it's the terminal, not the UI. If you're watching the canvas for a message, you'll see nothing - check the console window that launched ComfyUI. And because the pass-through is truly transparent, don't expect it to catch errors; if the upstream node fails, this node never runs. For that kind of debugging you want the error itself, not a marker. It's a breadcrumb, not an inspector - and for breadcrumbs, it's exactly right.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| value | * | — | |
| text | STRING | Debug | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | * | — |