Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Some option to configure xdebug with sublime, drupalvm

Some option to configure xdebug with sublime, drupalvm

IDE is listening for connections

Install Sublime text client

Your browser extension is set to debug

Install chrome xdebug helper

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:


Use drupal module 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": "", "super_globals": true, "close_on_stop": true } }


Set a breakpoint in the twig template with {{ devel_breakpoint() }}


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment