Debugging

Debugging HJI Plugins and Themes


HJI recommends a fairly standard debugging process to determine errors in PHP and Javascript during development. The WordPress Codex has a great, in-depth article on debugging in WordPress that covers the majority of strategies that can be used.

That being said, there are some specific things that need to be done to make your life easier when debugging HJI plugins and themes.


HJI Membership / WP Constants

Usage example: 

define('HJI_DEBUG_DEV_HOSTS_ZONE', ['develop']);
define('HJI_TIMBER_CACHE_ENABLE', true);
define('HJI_WP_ENVIRONMENT', 'dev');
Constant Value Description
HJI_WP_ENVIRONMENT dev or prod If the constant is not defined, fallback occurs to  HJI_WP_ENVIRONMENT = prod. In the prod mode minified versions of the CSS and JS files are loaded. When working in the prod mode with external APIs, e.g. Slipstream, calls are sent to their production versions and not test versions. When working in the ‘dev’ mode non-minified versions of the CSS and JS files are loaded and test versions of the external APIs are used.
HJI_DEBUG_DEV_HOSTS_ZONE array The lowest-level domain name constitutes the element of the array. For example, for https://hji-sites.develop, the array element that will be used is ‘develop’. This will be available in hji-blvd-framework version 4.15.0.
HJI_TIMBER_CACHE_ENABLE true or false This is responsible for turning on and off of caching in the Timber plugin.

Still need help? Contact Us Contact Us