Devel Kint Extras

Enhances Devel's Kint integration by displaying methods and statics available for objects during debugging.

devel_kint_extras
5,458 sites
25
drupal.org

Install

Drupal 11, 10, 9 v1.1.6
composer require 'drupal/devel_kint_extras:^1.1'

Overview

Devel Kint Extras is a development module that extends the Kint debugging capabilities within the Devel module. When using Kint to inspect PHP objects, this module enhances the output by showing available methods and static properties for objects, making it easier for developers to understand object structures and available functionality.

The module works by replacing Devel's default Kint dumper plugin with an extended version that provides additional configuration options including disabled iterator expansion, shallow blacklisting of container interfaces, and cleaner output formatting.

Important Notice: This module is now marked as obsolete. Devel v5.4.0 removed its Kint integration, making this module non-functional with newer Devel versions. Users are encouraged to use the standalone Kint module instead.

Features

  • Displays available methods and static properties for PHP objects in Kint output
  • Extends Devel's Kint dumper plugin with enhanced configuration
  • Disables the IteratorPlugin for cleaner output when inspecting iterables
  • Shallow blacklists ContainerInterface to prevent deep inspection of the service container
  • Disables folder display in Kint's RichRenderer for cleaner output
  • Automatically configures Kint aliases for internal debugging functions

Use Cases

Enhanced Object Debugging

When debugging complex Drupal objects like entities, services, or plugins, this module displays all available methods and static properties, helping developers understand what operations are available on an object without needing to look up the class documentation.

Cleaner Container Inspection

When inspecting objects that contain references to the service container, the shallow blacklist prevents Kint from recursively dumping the entire container, resulting in faster and more readable output.

Avoiding Iterator Expansion

For objects implementing Iterator interfaces, the disabled IteratorPlugin prevents automatic expansion of all elements, which can cause performance issues and overwhelming output when debugging large collections.

Tips

  • This module is now obsolete - consider migrating to the standalone Kint module for Drupal
  • The module works transparently - no configuration is needed after enabling
  • Use dpm(), kint(), or ksm() functions as you normally would with Devel
  • The extended Kint output is especially useful when exploring unfamiliar entity types or service classes

Technical Details

Hooks 1
hook_devel_dumper_info_alter

Alters the Devel dumper plugin definitions. This module uses this hook to replace the default Kint dumper class with the extended KintExtended class.

Troubleshooting 3
Module does not work with Devel 5.4.0 or newer

Devel 5.4.0 removed its built-in Kint integration. This module is now obsolete. Use the standalone Kint module (https://www.drupal.org/project/kint) instead.

Kint output not showing enhanced features

Ensure the module is enabled and clear caches. The module automatically replaces the Kint dumper class via hook_devel_dumper_info_alter.

Missing kint-php/kint library

Install the module via Composer to ensure the kint-php/kint dependency is automatically installed. Manual downloads may not include the required library.

Security Notes 3
  • This module is intended for development environments only
  • Never enable this module or the Devel module on production sites as it can expose sensitive information
  • The module has security advisory coverage for supported versions