getDebugData

Returns a struct with all the data collected for the current request's debug footer: queries (with bound parameters), pages (templates, tags and CFCs, each carrying a methods array of { name, count, total }), exceptions, traces, genericData (from debugAdd), scopes, and total times. All times are in microseconds. The BIF is available whenever the debug footer's enabled and viewer-allowed gates pass; the data is collected in CLI runs too, so it works even where no footer is rendered.

getDebugData() → returns struct

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

Examples
Sample code invoking the getDebugData function

Return the collected debug data as JSON for an AJAX endpoint.

content-type="application/json";
if ( isDebugMode() ) {
    write( serializeJson( getDebugData() ) );
}

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

Fork me on GitHub