Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to Enable Twig debugging options in Drupal 8

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 395
    Comment on it

    In this tutorial, I am going to show you how to Enable Twig debugging options in Drupal 8.

     

    To enable twig debugging
    1. Go to sites/default/services.yml file
    2. Look for services.yml  if it doesn't exist then copy it & rename to services.yml
    3. Open the services.yml file in the editor and change the default value of debugging options.

     

    Default Value of debugging options Under twig.config section:

     

    parameters:
      twig.config:
    
        debug: false
        auto_reload: null
        cache: true
    

     

    Value of debugging options after Changing:

     

    parameters:
      twig.config:
    
        debug: true
        auto_reload: true
        cache: false
    


    debug: Set debug to True will Enable various debugging features in the Twig engine like filename suggestions.

     

    auto_reload: Twig templates will automatically recompile when their source code changes by setting auto_reload to true.

     

    cache: Set to false will Disable Twig Cache.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: