Blog

Luis Majano

January 11, 2024

Spread the word


Share your thoughts

In the ever-evolving landscape of web development, staying ahead requires cutting-edge tools. Enter ColdBox Debugger v4.2.0, the latest release that promises an action-packed experience with a plethora of features, improvements, and bug fixes. This update introduces the Hyper Collector, allowing you to track Hyper HTTP/S requests effortlessly with aggregated data on total time, slowest requests, grouping, and timelines. Lucee SQL Collector now enables profiling of SQL queries, providing valuable insights into your Lucee-powered applications. The addition of Heap Dump Support empowers users to generate Java heap dumps for offline analysis, ideal for debugging memory leaks and ensuring system stability. A revamped Request Dock and enhanced SQL/JSON formatting contribute to an improved user interface. Moreover, the ability to add timers manually and download heap dump snapshots adds versatility to your debugging toolkit.

ColdBox Debugger v4.2.0 is not just an upgrade; it's a leap forward in simplifying the debugging process and enhancing overall development efficiency. Explore the new features and take your debugging game to new heights!

What is the ColdBox Debugger?

The ColdBox Debugger module is a lightweight performance monitor and profiling tool for ColdBox applications. It can generate a nice debugging dock on every rendered page or a dedicated visualizer to make your ColdBox application development nicer, funner and greater! Yes, funner is a word!

Debugger Request Visualizer

 

Capabilities

The ColdBox debugger is a lightweight performance monitor and profiler for your ColdBox applications. It tracks your requests, whether Ajax, traditional or REST, it's environment, execution and much more. Here is a listing of some of the capabilities you get with the ColdBox Debugger:

  • Track all incoming requests to your applications
  • Track exceptions and execution environment
  • Track incoming HTTP requests, parameters, body, and much more
  • Track final request collections
  • Track Hibernate and cborm queries, criteria queries, and session stats
  • Track qb and quick queries, entities, and stats
  • Tap into LogBox via our Tracer messages and discover logging on a per-request basis
  • Profile execution and results of ANY model object
  • Profile execution of ANY ColdBox interception point
  • Custom Timer helpers for adding timing methods and annotations anywhere in your code
  • Profile your production or development apps with ease
  • Track ColdBox modules and lifecycles
  • Track Hyper HTTP/S calls
  • Track Adobe ColdFusion Queries (ColdFusion 2018+)
  • Track Lucee Queries

Installation

It's very easy. Just use CommandBox:

install cbdebugger --savedev

You will then need to configure the debugger with it's plethora of data collectors: https://cbdebugger.ortusbooks.com/essentials/configuration

Major Updates

Here is a listing of all the major areas of improvement of this release. However, you can see the full what's new guide here: https://cbdebugger.ortusbooks.com/introduction/release-history/whats-new-with-4.2.0

New Docs

We have a brand new book just for the ColdBox Debugger. Every single setting, feature, crook and cranny documented for your usage: https://cbdebugger.ortusbooks.com/

Hyper Collector

You can now track Hyper http/s requests right in a new panel. It will also aggregate the request's total time, slowest, grouped, and timeline. It also comes with some great options for configuration:

// Hyper Collector
hyper    : {
	enabled         : false,
	expanded        : false,
	logResponseData : false,
	logRequestBody  : false
}

Lucee SQL Collector

The ColdBox debugger can now profile any SQL running via Lucee queries. It will provide grouped, timeline, and slowest views as well. However, you must make sure that Lucee is in debugging mode.

IMPORTANT Please note that to use this feature the engine must have two debugging settings enabled

"debuggingDBEnabled":"true",
"debuggingEnabled":"true",

You can easily add those to your .cfconfig.json or enable it under the Debugging panel in the Lucee Admin.

Here are the configuration settings available for it:

luceeSql : {
	enabled : true,
	expanded : false,
	logParams : true
},

Heap Dump Support

Create a Java Heap Dump

You now can generate Java heap dumps from the debugger visualizer so you can analyze the heap offline. Great for debugging memory leaks or just system stability.

New Request Dock

The request dock has now been cleaned up to only show the request's information and the UI updated for a better and seamless dock UI. The rest of the information has been moved to the visualizer at the /cbdebugger entry point.

New Request Dock

Once you click on the dock, it will expand to show the current request's debugging information.

Expanded Dock

Improved SQL/JSON Formatting

We have added new improvements to visualizing SQL and JSON in the context panels.

Add Timers Manually

You can now add timers manually into the tracking facilities via the Timer object's add() method or via the TimerDelegate and the addCBTimer() method.

/**
 * Add a timer to the stack manually. You will need the label, 
 * executionTime and stoppedAt timestamps
 *
 * @label         The label to use as a timer label
 * @executionTime The execution time in ms to register
 * @startedAt     The date time the timer was started
 * @stoppedAt     The date time the timer was stopped
 * @metadata      A struct of metadata to store in the execution timer
 * @parent        An optional parent label
 * @type          The type of execution timed: request, view-render, layout-render, event, renderer
 */
function add(
	required label,
	required executionTime,
	startedAt       = now(),
	stoppedat       = now(),
	struct metadata = {},
	parent          = "",
	type            = "timer"
)

You can get access to the Timer object in different ways:

// Get in your layouts/handlers/views/interceptors
getInstance( "Timer@cbDebugger" )
// Inject
property name="timer" inject="Timer@cbdebugger"
// ColdBox 7 Delegates
component delegates="TimerDelegate@cbdebugger"{}

Enjoy!

You can visit our documentation here: https://cbdebugger.ortusbooks.com/ to see all the capabilities you can get with the ColdBox Debugger.

Add Your Comment

Recent Entries

Into the Box 2025 | Plan Your Trip With Us!

Into the Box 2025 | Plan Your Trip With Us!

Are you ready to join us for Into the Box 2025 from April 30th to May 2nd in Washington, D.C.? Let’s make your trip planning as smooth as possible. Here you’ll find Airfare discounts, Hotel Deals and fun things to do to the the best out of your trip to D.C.

Maria Jose Herrera
Maria Jose Herrera
January 29, 2025
BoxLang YAML Support has landed

BoxLang YAML Support has landed

We’re thrilled to introduce the bx-yaml module for BoxLang!

This powerful new module brings seamless YAML parsing and emitting capabilities to BoxLang. You can now effortlessly serialize BoxLang native types—including structs, queries, arrays, classes, and more—into YAML. The same simplicity applies to deserialization, making it easy to work with YAML data in your BoxLang applications.

Luis Majano
Luis Majano
January 28, 2025
TestBox v6.1.0 Release

TestBox v6.1.0 Release

We’re super excited to announce the release of TestBox 6.1.0! This release introduces native support for BoxLang without the need for a compatibility mode, unlocking new possibilities for developers embracing BoxLang’s dynamic capabilities. Alongside this exciting update, we’ve added valuable features, improved functionality, and resolved key issues to ensure a smoother and more robust testing experience. Dive into the details and see how TestBox 6.1.0 makes your testing even more seamless and efficient!

Luis Majano
Luis Majano
January 28, 2025