Files
Graphite/node-graph/nodes/gcore/src/debug.rs
Keavon Chambers 710a7aff55 Reorganize the node catalog's categories (#4787)
Reorganize the node catalog's categories and hide Debug nodes in production builds
2026-10-23 23:17:30 -07:00

12 lines
511 B
Rust

use core_types::Ctx;
use core_types::list::Item;
use glam::{DAffine2, DVec2};
/// Meant for debugging purposes, not general use. Logs the input value to the console and passes it through unchanged.
#[node_macro::node(category("Data: I/O"), icon("NodeDebugLog"))]
fn debug_log<T: std::fmt::Debug>(_: impl Ctx, #[implementations(bool, f64, i64, DVec2, DAffine2, String)] value: Item<T>) -> Item<T> {
// KEEP THIS `debug!()` - It acts as the output for the debug node itself
log::debug!("{value:#?}");
value
}