Some option to configure xdebug with sublime, drupalvm
IDE is listening for connections
Install Sublime text client https://github.com/martomo/SublimeTextXdebug
Your browser extension is set to debug
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,
either in xdebug.ini or php.ini, if you are using a version of xdebug prior to 2.3:
xdebug.max_nesting_level=1000
Use drupal module twig xdebug
https://www.drupal.org/project/twig_xdebug
In drupalvm config.yml, Enable xdebug via installed_extras and set the following as well:
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
the "folders" config that should already exist:
"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 } }
Run
Set a breakpoint in the twig template with {{ devel_breakpoint() }}