Skip to main content

Enable Twig debug mode in drupal 9+ (Optional) Enable render caching debugging

In your sites/development.services.yml, add the following twig.config configuration nested under the parameters key:

# Local development services.
#
# To activate this feature, follow the instructions at the top of the
# 'example.settings.local.php' file.
parameters:
  http.response.debug_cacheability_headers: true
  twig.config:
    debug: true
    auto_reload: true
    cache: false
services:
  cache.backend.null:
    class: Drupal\Core\Cache\NullBackendFactory

(Optional) Enable render caching debugging

To enable render caching debugging, update renderer.config and set its debug parameter value to true in your site's services.yml or development.services.yml.

parameters:
  http.response.debug_cacheability_headers: true
  twig.config:
    debug: true
    auto_reload: true
    cache: false
  renderer.config:
    required_cache_contexts: ['languages:language_interface', 'theme', 'user.permissions']
    auto_placeholder_conditions:
      max-age: 0
      contexts: ['session', 'user']
      tags: []
    debug: true

 

cache

Latest Articles

VSCode Drupal Coding Standards Setup (From Scratch) admin_pixelthi… Mon, 12/22/2025 - 16:01 VSCode Drupal Coding Standards Setup (From Scratch)

VSCode Drupal Coding Standards Setup (From Scratch)

vscode
Using drupal/core-composer-scaffold to prevent rewriting .htaccess or robots.txt file admin_pixelthi… Sun, 12/01/2024 - 16:49 Using drupal/core-composer-scaffold to prevent rewriting .htaccess or robots.txt file

Using drupal/core-composer-scaffold to prevent rewriting .htaccess or robots.txt file

composer
Controlling ckeditor styling options with hook_editor_js_settings_alter admin_pixelthi… Thu, 05/16/2024 - 10:49 Controlling ckeditor styling options with hook_editor_js_settings_alter

Controlling ckeditor styling options with hook_editor_js_settings_alter

php hook hook_editor_js_settings_alter hook_field_widget_single_[WIDGET_TYPE]_form_alter
#1273 - Unknown collation: 'utf8mb4_0900_ai_ci' admin_pixelthi… Tue, 06/23/2020 - 13:21 #1273 - Unknown collation: 'utf8mb4_0900_ai_ci'

#1273 - Unknown collation: 'utf8mb4_0900_ai_ci'

utf8mb4