FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...

ColdBox Debugger

v2.2.0+45 Public

Build Status

WELCOME TO THE COLDBOX DEBUGGER MODULE

This module will enhance your application with debugger capabilities, a nice debugging panel and much more to make your ColdBox application development nicer, funer and greater! Yes, funer is a word!

LICENSE

Apache License, Version 2.0.

SYSTEM REQUIREMENTS

  • Lucee 5+
  • ColdFusion 2016+

INSTRUCTIONS

Just drop into your modules folder or use CommandBox to install

box install cbdebugger

This will activate the debugger in your application and render out at the end of a request.

Settings

This will also allow you to use several settings in your parent application or you can modify the settings in the ModuleConfig if desired. We recommend placing your debugger settings in your main ColdBox.cfc configuration file under a debugger struct.

// Debugger Settings
debugger = {
    // Activate debugger for everybody
    debugMode = true,
    // Setup a password for the panel
    debugPassword = "",
    enableDumpVar = true,
    persistentRequestProfiler = true,
    maxPersistentRequestProfilers = 10,
    maxRCPanelQueryRows = 50,
    showTracerPanel = true,
    expandedTracerPanel = true,
    showInfoPanel = true,
    expandedInfoPanel = true,
    showCachePanel = true,
    expandedCachePanel = false,
    showRCPanel = true,
    expandedRCPanel = false,
    showModulesPanel = true,
    expandedModulesPanel = false,
    showQBPanel = true,
    expandedQBPanel = false,
    showRCSnapshots = false,
    wireboxCreationProfiler=false
};

WireBox Mappings

The module will also register two model objects for you:

The DebuggerService can be used a-la-carte for your debugging purposes. The Timer object will allow you to time code execution and send the results to the debugger panel.

Mixins

This module will also register a few methods in all your handlers/interceptors/layouts and views:

/**
* Method to turn on the rendering of the debug panel on a reqquest
*/
any function showDebugger()

/**
* Method to turn off the rendering of the debug panel on a reqquest
*/
any function hideDebugger()

/**
* See if the debugger will be rendering or not
*/
boolean function isDebuggerRendering()

LogBox Appender

This module also comes with a LogBox appender called cbdebugger.includes.appenders.ColdboxTracerAppender so your application can log to the debugger's tracer. You won't be able to configure the appender in your main LogBox configuration since modules aren't loaded until after LogBox is already created. What you can do though is add the appender programmatically to LogBox using the afterConfigurationLoad interception point. Here's an example of what that might look like:

// This appender is part of a module, so we need to register it after the modules have been loaded.
function afterConfigurationLoad() {
    var logBox = controller.getLogBox();
    logBox.registerAppender( 'tracer', 'cbdebugger.includes.appenders.ColdboxTracerAppender' );
    var appenders = logBox.getAppendersMap( 'tracer' );

    // Register the appender with the root loggger, and turn the logger on.
    var root = logBox.getRootLogger();
    root.addAppender( appenders['tracer'] );
    root.setLevelMax( 4 );
    root.setLevelMin( 0 );
}

Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.coldbox.org | www.luismajano.com | www.ortussolutions.com


HONOR GOES TO GOD ABOVE ALL

Because of His grace, this project exists. If you don't like this, then don't read it, its not for you.

"Therefore being justified by faith, we have peace with God through our Lord Jesus Christ: By whom also we have access by faith into this grace wherein we stand, and rejoice in hope of the glory of God. And not only so, but we glory in tribulations also: knowing that tribulation worketh patience; And patience, experience; and experience, hope: And hope maketh not ashamed; because the love of God is shed abroad in our hearts by the Holy Ghost which is given unto us. ." Romans 5:5

THE DAILY BREAD

"I am the way, and the truth, and the life; no one comes to the Father, but by me (JESUS)" Jn 14:1-12

Dependencies (0)


Dev Dependencies (0)


Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.


[2.2.0] => 2020-MAY-18

Added

  • Upgraded Appender to script and fixes for LogBox 6
  • More tests for logbox loading and appender registration

Fixed

  • Visual display of the debugger version

[2.1.0] => 2020-MAY-14

Added

  • ColdBox 6 support
  • Formatting

Removed

  • ColdBox 4 lingering code

[2.0.0] => 2020-MAY-04

Added

  • Formatting updates
  • Quick/QB Panels

Removed

  • Dropped ACF 11 support

[1.7.1] => 2019-MAR-06

  • Updated location protocol

[1.7.0] => 2019-MAR-06

  • Missing interception points for extending the panels: afterDebuggerPanel, beforeDebuggerPanel
  • New Module Layout
  • Dropping lucee 4.5 support

[1.6.0 ]

  • ColdBox 5 Support

[1.5.0]

  • Case-Sensitive filesystems fix
  • Updated travis builds
  • Unified workbench approach

[1.4.0]

  • ColdBox Tracer Appender added by Default by Eric Peterson

[1.3.0]

  • Travis integration
  • DocBox update
  • Build process update

[1.2.0]

  • Fix unscoped currentrow which was throwing an error when debugging was enabled.
  • Removed reference to missing images in CSS
  • Updated build scripts
  • How to turn off debugger for tests, it does this automatically now.
  • filename cases don't match #5 on certain includes

[1.1.0]


[1.0.1]

  • Bug fixes on caching panels and chicken/egg issues for ColdBox loading

[1.0.0]

  • Create first module version

 

$ box install cbdebugger

No collaborators yet.
     
  • Sep 01 2014 05:25 PM
  • May 18 2020 09:59 AM
  • 6,712
  • 4,093
  • 16,759