1. Download and install PDT (Eclipse PHP Development Tools).
  2. You may need to install the latest Java SE Development Kit 7 for Eclipse to run properly.
  3. Launch Eclipse and create a new PHP project using the /vdd/data/drupal7 shared directory.
    • File->New->Project->PHP->PHP Project
    • Next
    • Project Name: Drupal7.dev
    • Contents->Create project at existing location (from existing source)
    • Directory: Select /vdd/data/drupal directory on host machine
    • PHP Version: use default PHP settings
    • Javascript Support: enable by checking box
    • Click Finish. May take a while...Select yes to open PHP perspective.
  4. Set up Eclipse to use Xdebug
    • Eclipse->Preferences...
    • PHP->Debug->PHP Servers...
    • Select "Default PHP Web Server" click on Edit
    • Select "Xdebug" from Debugger: choices.
    • Click OK
  5. Set up Eclipse to listen for incoming Xdebug connections
    • Ecplipse->Preferences...
    • PHP->Debug->Installed Debuggers
    • Select Xdebug click on Configure
    • Set "Accept remote session (JIT)" to "prompt"
    • Click OK, Click OK
  6. In Eclipse, open drupal7/index.php by double clicking on the filename in the PHP Explorer tab on the left.
  7. Set a breakpoint (for example at the "require_once..." line) by clicking in the left margin of the editor window next to the line.
  8. Install easy Xdebug add-on to Firefox
  9. Navigate to your Vagrant drupal installation with firefox (ie: http://drupal7.dev or http://192.168.44.44/drupal7)
  10. Enable Xdebug in Firefox by clicking on the easy-xdebug (green bug with an arrow icon) in the toolbar. When the icon has a little red circle, it is enabled.
  11. Refresh/reload the page in Firefox and then switch over to Eclipse. You should see a prompt asking if you want to accept "Remote debug session requested from drupal7.dev/...". Accept by clicking yes. You'll then get a prompt asking if you want to switch to the Debug perspective. Select yes. You can now examine variables, single step, set breakpoints, etc.