Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Devbuddha on
Hello, i use DDEV for local development, but i have a problem with Twig Debugging. I create my services.yml File and enable Twig debugging, Live Reload and disable the Cache. But i cant see the Comments in my Code Inspector. This only happens, when i use DDEV as my Development Environment. Maybe one of you have experience with DDEV and can help me.
Comments
In your file "settings.ddev
In your file "settings.ddev.php", add this line at the end of the file:
Assuming the file 'services.yml' is located at '/sites/default'
I think you mean
I think you mean
$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
You shouldnt be touching services.yml for development
Thank you!
Adding the snippet to setting.ddev.php did it for me.
Please don't edit settings.ddev.php
settings.ddev.php is replaced on every start by ddev, so editing it isn't a good idea.
Instead, make your changes in youf settings.php .
Thanks. Since I wrote this
Thanks. Since I wrote this comment I have learned sttings.ddev.php shoul dnot be edited. I typicaly create a settings.php to do any edits I need. I appreciate the feedback.
Excellent fixed
Excellent advise frustrating just simply adding to services.yml
Thankyou settings.php works best to make sure it get's picked up.
So helpful, thank you for the
So helpful, thank you for the update!
It's so frustrating when you're new to Drupal and working through D9 tutorials (that feature Twig debugging) and they don't address this.
Added to DDEV docs
I did a PR to mention this in the DDEV docs, although it's not a DDEV thing, but lots of people discover the problem doing local development. https://github.com/drud/ddev/pull/4158