Getting debug functionality to output used to be pretty hard to do, or if not hard, then just convoluted. Whilst trying to get this working I found a few Stack Overflow entries that mentioned registering Twig extensions and setting Twig options when the object is initialised, but those are all out of date. This is how you get Twig debug mode within a Silex application...