[[TOC]]
Introduction
Devel module contains helper functions and pages for Drupal developers and inquisitive admins:
- A block and toolbar for quickly accessing devel pages
- Debug functions for inspecting a variable such as
dpm($variable)
- Debug a SQL query
dpq($query
or print a backtraceddebug_backtrace()
- A block for masquerading as other users (useful for testing)
- A mail-system class which redirects outbound email to files
- Drush commands such as
fn-hook
,fn-event
,token
,uuid
, anddevel-services
- Devel Generate. Bulk creates nodes, users, comment, taxonomy, media, menus for development. Has Drush integration.
This module is safe to use on a production site. Just be sure to only grant access development information permission to developers.
Collaboration
- https://gitlab.com/drupalspoons/devel is our workplace for code, MRs, and CI. See DrupalSpoons for more info.
- Drupalspoons auto-pushes back to git.drupalcode.org in order to keep Security Team coverage and packages.drupal.org integration.
- Chat with us at #devel on Drupal Slack.
Local Development
- Clone devel
git clone https://gitlab.com/drupalforks/devel.git
(note - this is the shared fork, not the "spoon") cd devel
- Install the composer plugin from https://gitlab.com/drupalspoons/composer-plugin. Your source tree now looks like:
- Configure a web server to serve devel's
/web
directory as docroot. Either of these works fine:vendor/bin/spoon runserver
- Setup Apache/Nginx/Other. A virtual host will work fine. Any domain name works.
- Configure a database server and a database.
- Install a testing site
vendor/bin/spoon si -- --db-url=mysql://user:pass@localhost/db
. Adjust as needed.
Testing
- CI docs gives info on running tests.
- See develCommandsTest.php for an example of Drush command testing. This uses Drush Test Traits.
Version Compatibility
Devel version | Drupal core | PHP | Drush |
---|---|---|---|
4.x | 8.9+, 9, 10 | 7.2+ | 9+ |
8.x-2.x | 8.x | 7.0+ | 8+ |
Maintainers
See https://gitlab.com/groups/drupaladmins/devel/-/group_members.