derickr / twig-ext

Extension for dropping into Twig
31 stars 4 forks source link

Debugging twig templates #3

Open pulse00 opened 12 years ago

pulse00 commented 12 years ago

I'm the author of the Twig Eclipse Plugin and am thinking of a way to create step-through debugging support for twig templates.

As you've written both the twig c extension and also xdebug, i'm wondering if you could give me some feedback on if this would be possible.

Basically, if you're stepping through a HTTP request involving twig templates in the PHP debugger right now, when the twig template is rendered you are stepping through the generated PHP class, which is not really user-friendly.

I'm wondering if there's some way to translate those compiled php templates back to the original line numbers to work with an IDE step-debugger.

MaccabeeY commented 9 years ago

Thank you for the Twig Eclipse Plugin, it is wonderful! I am concluding an evaluation for a corporate framework upon which we will build our enterprise application.

The two front runners are Zend and symfony2. After some time of investigation I was leaning heavily toward symphony2 until I hit the 'brick wall' that twigs cannot be stepped through in the debugger (xdebug, for example). This discovery has brought me full circle back to choosing Zend.

Before, the final choice is made I wanted to reply here to inquire if you have created or know of someone that has created, a step-through debugger that works with of a debugger like xdebug (that one could use in eclipse, for example) that offers step-through of twigs?

Thanks! Edward