π§ Debug String
Print anything to the ComfyUI console without breaking your graph
- DebugString
- DebugOutput
π§ Debug String is the "am I actually getting what I think I'm getting?" node. You drop it onto any wire, and when the workflow runs it prints the value to the console in bright yellow, prefixed with DebugString:. That's the whole job, and it's genuinely the most useful node in this pack for anyone whose text values keep mysteriously not matching their expectations.
Why you need it: ComfyUI is a wall of wires, and strings are the least inspectable thing in it. A node's tooltip says "STRING" but is it the prompt you think it is, or a filename, or a Python list repr? Clicking around the graph won't tell you. This node's answer is print() with a spotlight on it.
How it works
The important trick is the input type. DebugString is typed as * (any type), using the same "any" hack pythongosssss popularized - so you can hang it off almost any output in your graph, not just text. The node casts whatever arrives to a string, prints it to the console, and returns it as its DebugOutput (a STRING) so you can chain it inline without rerouting your whole graph.
Two things worth internalizing:
- It's an output node. ComfyUI treats it as a terminal - it forces that branch of the graph to execute even if nothing downstream consumes it. That's usually what you want for debugging, but don't leave DebugString nodes lying around in a workflow you plan to batch-run; they'll hold the branch open on every run.
- The output lives in the console, not the UI. Beginners hunt for the value on the node and find nothing. You need to be looking at the terminal where you launched ComfyUI (or the Docker logs, if you run it that way). Yellow
DebugString: your value hereis what you're watching for.
Where it fits
Use it in the same spots you'd use a print statement in normal code: after a formatter you're not sure about, on a LoRA name from Lora Selector before it hits a saver, on a wildcard node's resolved output to see whether the wildcard even expanded. It's the quickest way to confirm "empty string" vs "space-filled string" - a distinction that silently breaks metadata and that no preview will show you.
Installing it
It ships inside ComfyUI-StringsAndThings, so install the pack. ComfyUI Manager: search "ComfyUI-StringsAndThings" β Install β restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/PressWagon/ComfyUI-StringsAndThings
No models, no special setup. The pack's requirements pin scipy and exact torch/numpy versions, but all are standard on a working ComfyUI install.
Caveats
- DebugString prints in whatever order the graph executes its branch; with parallel branches, console order isn't a strict guarantee of sequence.
- The
*input means it'll accept images, latents, whatever - and print the tensor repr, which is mostly noise. It shines on strings; use it as a string node and you won't be disappointed. - Because it's an output node, you can't mute it the way you'd mute a preview. When you're done debugging, delete it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| DebugString | * | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DebugOutput | STRING | β |