# Is there Slim support for Twig dump( ) method?

**URL:** <https://discourse.slimframework.com/t/is-there-slim-support-for-twig-dump-method/1013>\
**Category:** Questions\
**Created:** [December 19, 2016, 9:43pm UTC](https://discourse.slimframework.com/t/is-there-slim-support-for-twig-dump-method/1013 "2016-12-19T21:43:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![codejunky](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/codejunky/32/283_2.png) [@codejunky](https://discourse.slimframework.com/u/codejunky)\
**Post date:** [December 19, 2016, 9:43pm UTC](https://discourse.slimframework.com/t/is-there-slim-support-for-twig-dump-method/1013/1 "2016-12-19T21:43:13Z")

</div>

Is there Slim support for Twig dump( ) method…or do I have to build my own extension to support this default functionality in SlimFramework??

thanks,  
-cj

---

<div class="post-metadata">

**Author:** ![codejunky](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/codejunky/32/283_2.png) [@codejunky](https://discourse.slimframework.com/u/codejunky)\
**Post date:** [December 19, 2016, 10:22pm UTC](https://discourse.slimframework.com/t/is-there-slim-support-for-twig-dump-method/1013/2 "2016-12-19T22:22:18Z")

</div>

Gotta addExtension Twig\_Extension\_Debug in dependencies and then the dump functions will work.

$basePath = rtrim(str\_ireplace(‘index.php’, ‘’, $c[‘request’]-\>getUri()-\>getBasePath()), ‘/’);  
$view-\>addExtension(new Slim\Views\TwigExtension($c[‘router’], $basePath));  
**$view-\>addExtension(new Twig\_Extension\_Debug());**
