cbdebugger

Use this skill when installing, configuring, or using the CBDebugger visual debugging panel in a ColdBox application. Covers enabling the panel in development, performance profiling, SQL query tracking, cache monitoring, request inspection, and ensuring the debugger is disabled in production.

CBDebugger Skill

When to Use This Skill

Load this skill when:

  • Installing or enabling the CBDebugger module
  • Diagnosing performance bottlenecks in development
  • Tracking SQL queries and their execution times
  • Inspecting RC/PRC/CGI scopes during debugging
  • Configuring the debugger to appear only in specific environments
  • Ensuring debugger is never exposed to end-users in production

Installation

box install cbdebugger

Configuration

Always gate the debugger behind an environment check:

// config/ColdBox.cfc
moduleSettings = {
    cbdebugger = {
        // Only enable in development — never expose in production
        enabled        = getSetting( "environment" ) == "development",
        renderDebugPanel = true,
        expanded       = false,         // collapse panel by default

        // Optional: restrict to specific IPs
        ipList         = "127.0.0.1",   // comma-separated list

        // Profiling options
        showTracers    = true,
        queryMonitor   = {
            enabled    = true,
            logQueries = false          // set true to log all queries
        }
    }
}

Features

FeatureDescription
Performance ProfilingRequest timings and execution paths
SQL Query TrackingAll DB queries with execution time and bindings
Cache MonitoringCacheBox statistics and operations
Request InspectionRC, PRC, CGI, form, and URL scopes
Tracer MessagesCustom tracer() calls inline in code
Exception DetailFull stack traces with local variable context

Usage in Handlers / Flow

// Add a debug tracer message (only visible when debugger is enabled)
tracer( "About to call payment service", { orderId : rc.orderId } )

// Then continue your logic
paymentService.charge( rc.orderId )

Production Safety Checklist

  • enabled must evaluate to false in staging and production
  • Never deploy with ipList empty and enabled = true on a public server
  • Use getSetting("environment") or .env variables — not hard-coded true
  • Panel renders at bottom of HTML responses — harmless when disabled but wasteful at scale

Documentation

Full documentation: https://coldbox-debugger.ortusbooks.com