0

How do I debug the template overrides. The debugger stops on page.html.twig but doesn't stop on sub templates such as

web/themes/custom/localtheme/templates/field--paragraph--field-pbcrossfade-image--crossfade-banner.html.twig

The page.html.twig breaks here

enter image description here

The debugger does not break in the sub template.

enter image description here

2
  • What about immediately after a cache rebuild?
    – Clive
    Aug 3, 2021 at 9:55
  • Bizarrely it doesn't break on the first page load after a page rebuild.
    – Interlated
    Aug 3, 2021 at 10:14

1 Answer 1

0

I don't think {{ breakpoint }} is a valid twig function to have a PHP pause.

If you have the module devel installed, you can use {{ devel_breakpoint() }}

Otherwise you can use {{ drupal_breakpoint() }} if you have Twig Tweak installed.

Documentation : https://www.drupal.org/docs/contributed-modules/twig-tweak-2x/cheat-sheet#s-drupal-breakpoint

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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