debugAdd

Appends rows to the Generic data section of the debug footer. The supported channel for app code and frameworks to inject their own debug panel. Two call forms: debugAdd( category, struct ) adds each key/value of the struct as a row, or debugAdd( category, name, value ) adds a single named row.

debugAdd(category, name, value [, key]) → returns void

This function requires RustCFML.  Not supported on Lucee, Adobe ColdFusion, etc.

Argument Reference

category string
Required

A category label; rows are grouped under it in the footer's Generic data section.

name any
Required

The row name, or (in the two-argument form) a struct of name/value pairs.

value any

The row value (three-argument form only).

Examples
Sample code invoking the debugAdd function

Add controller and cache information to the footer when debug is on.

if ( isDebugMode() ) {
    debugAdd( "MyApp", { controller: "users.index", cacheHit: false } );
}

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub