Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Usage Milestone: Time Field for Drupal 8+ Module time_field crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

var_debugger

1 sites Security covered Drupal 9–11
View on drupal.org

Var Debugger is a lightweight Drupal module that helps developers debug variables. It provides easy-to-use functions for both PHP and Twig to display a variable's value, type, and the location where it was accessed, with an option to stop script execution.

Var Debugger is a lightweight Drupal module designed to assist developers in debugging variables with additional contextual information, such as file name, line number, and variable type. It provides an easy-to-use global function and a Twig extension to inspect data within both PHP scripts and Twig templates.

Features

Global Debugging Function (var_debugger)

Logs a variable’s type and value.
Displays the file and line number where the function was called.
Supports optional script termination after logging.
Uses Symfony VarDumper for better readability.

var_debugger($variable);
var_debugger($variable, TRUE); // Stops script execution after logging.

Twig Integration
Adds a custom Twig function var_debugger() for debugging inside templates.

{{ var_debugger($variable) }}
{{ var_debugger($variable, TRUE) }} // Stops script execution after logging.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Mar 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
1.0.0 Stable 9–11 Mar 10, 2025