Installation: What's in the box
This documentation needs work. See "Help improve this page" in the sidebar.
Installing Devel With Composer
To install Devel using Composer:
$ composer require drupal/devel --dev
Kint should be installed as a dependency for this module if you plan on using it for variable debugging. If your project doesn't already have Kint installed, it can be installed via Composer:
$ composer require kint-php/kint --dev
After installing Kint, the "Kint" radio button should be available under "Variables Dumper" in the "Devel Settings" page. If the radio button is not visible, try clearing the caches and refreshing the page.
When you download Devel into your site folders, you will find four new Devel modules now appear in the Extend page, (/admin/modules.
Name | Description |
---|---|
Devel | Various blocks, pages, and functions for developers. |
Devel Generate | Generate dummy users, nodes, and taxonomy terms. |
Devel Kint* | Wrapper for the Kint debugging tool. |
Web Profiler | A port of the Symfony WebProfilerBundle toolbar for Drupal 8. |
* Please note: As of Version: 8.x-3.x, the Devel Kint module is no longer included. Kint should be added separately as a dependency. See "Installing Devel With Composer" above for more information
Each of these Devel tools can help you with development.
Devel, of course, is the main module and must be enabled for the other modules to operate.
- adds new PHP functions to help with development and debugging. Learn more about dpm() and other Devel functions.
- adds blocks: for running custom PHP on a page, for quickly accessing Devel pages, for masquerading as other users and a mail-system class which redirects outbound email to files.
Other uses for Devel, as described in the help system:
- Inspecting Service Container
- The module allows you to inspect Services and Parameters registered in the Service Container. You can see those informations on Container info page (/devel/container/service).
- Inspecting Routes
- The module allows you to inspect routes information, gathering all routing data from .routing.yml files and from classes which subscribe to the route build/alter events. You can see those informations on Routes info page (/devel/routes).
- Inspecting Events
- The module allow you to inspect listeners registered in the event dispatcher. You can see those informations on Events info page (/devel/events).
Why use Devel Generate?
- To preview your theme populated with articles, with comments and users.
- Test permissions and workflow with different user roles.
- Demo a site to a client.
Devel Kint
- Provides a dpr() function, which pretty prints variables.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion