How to enable Dojo debugging in the browser console
Applies to
HCL Digital Experience v9.5 and higher
Introduction
The Dojo toolkit used within HCL DX relies on the djConfig global configuration object to manage runtime behavior and logging levels. Enabling djConfig.isDebug instructs the framework to route diagnostic messages, module loading details, and execution traces directly to the browser console. This article explains how to enable djConfig.isDebug output to the browser console.
Instructions
To enable djConfig.isDebug output to the browser console, perform the following steps:
- Open the custom JavaScript file or theme layout template where Dojo is loaded.
-
Insert the
djConfigdefinition before loading the core Dojo loader script (typicallydojo/dojo.jsor the equivalent script that loads Dojo in your theme):window.djConfig = { isDebug: true };Note
Declare the
djConfigobject prior to the execution ofdojo.js. DefiningdjConfigafter Dojo initializes prevents debug logs from outputting to the console. -
Save the file changes and refresh the page in the browser.
- Open your browser's Developer Tools and select the Console tab.
- Confirm that Dojo initialization statements and log outputs appear in the console.