Install Sublime text client https://github.com/martomo/SublimeTextXdebug
Install chrome xdebug helper https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc
For working in Drupal 8, you will need to add this line to the xdebug section of your php configuration,
xdebug.max_nesting_level=1000
https://www.drupal.org/project/twig_xdebug
php_xdebug_idekey: sublime.xdebug
php_xdebug_default_enable: 1
Edit your project's .sublime-project file (Project menu > Edit project) and add the following sibling to
"settings": { "xdebug": { "path_mapping": { "/var/www/projectname/docroot" : "/Users/jeff.geerling/Sites/projectname/docroot", }, "url": "http://local.projectname.com/", "super_globals": true, "close_on_stop": true } }
Set a breakpoint in the twig template with {{ devel_breakpoint() }}