Sublime Text 2 configuration

 


Resources

Useful Plugins

XDEBUG

Was able to get XDEBUG working with this new plugin https://github.com/martomo/SublimeTextXdebug. Need to follow the directions in the readme for constructing appropriate settings. I have attached an example of kalademo.sublime-project:

 
 {
 "folders":
 [
  {
   "path": "/Users/mpirog/kalabox/www/kalademo"
  }
 ],
 "settings":
  {
   "xdebug": {
    "path_mapping": {
      "/var/www/kalademo" : "/Users/mpirog/kalabox/www/kalademo"
     },
    "ide_key": "sublime.xdebug",
    "url": "kalademo.kala",
    "port": 9000
   }
  }
 }

 

In order to get the get the debugger running you need to attach the following to the page you are debugging:

  ?XDEBUG_SESSION_START=sublime.xdebug

You will get output like this:

I think you can get the session to persist if you launch the browser from ST2 with the xdebug launch command. This should enable you to debug submit buttons.

Drush

I've been able to debug drush by using this old jank program: http://www.bluestatic.org/software/macgdbp/index.php 

 

You need to share your drush folder in vagrant. There is now a commented out line you can uncomment in the vagrant file to do this. However, you will want to copy /usr/var/drush on the guest into ~/kalabox/drush on the host first otherwise it will empty out drush on the guest and you will lose

all of that shit. Once you have shared the drush folder you need to make sure you specify a path mapping in MacGDBP in the preferences. The mapping should be remote: /usr/share/drush local: /Users/YOURUSERNAME/kalabox/drush. Add a breakpoint in this program and then run a drush command on the guest and it should catch at the breakpoint.

Â