1

As in question. I'm following this tutorial: https://dev.acquia.com/blog/debugging-drupal-8/debugging-twig-templates-in-drupal-8-with-phpstorm-and-xdebug/25/08/2016/16586

but directory

sites/default/files/php/twig

is always empty

I'v tried cr all, checked file system page, did drush cron, checked theme page - no errors.

I got some errors related to permissions at theme settings page, but:

chmod 777 -R sites/default/files

seems to solved those.

Any advices?

1

Probably the directory sites/default/files/php/twig is empty because the container parameter twig.config.cache is set to false.

The approach used in the linked article is arguable.. put a breakpoint in every twig compiled template is not a viable solution. For debugging twig templates with xdebug there are better alternatives:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.