Score:0

How do I debug overridden twig templates?

km flag

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

cn flag
What about immediately after a cache rebuild?
Interlated avatar
km flag
Bizarrely it doesn't break on the first page load after a page rebuild.
Score:0
in flag

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

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.