How to use Xdebug and PhpStorm with VDD

How to use Xdebug and PhpStorm with VDD

Starting from version 1.3 VDD supports out of the box Xdebug configuration. You can simply start you virtual environment, open your project with PhpStorm and start debugging.

Preparations

To make your debugging more comfortable you should install Xdebug helper extension in your browser. I'll use Google Chrome in this example.

Setting up PhpStorm for Drupal's Coding Standards

The original article was created by Angus Mak of Lullabot! Check it on http://www.lullabot.com/articles/phpstorm-drupal

Debugging Drupal modules and themes (or Drupal core itself) can be challenging without a good IDE. After using numerous IDE and text editors, PhpStorm has earned its place as my primary IDE for almost anything Drupal-related. By default, PhpStorm is as Drupal friendly as most other IDEs. However, some of its default syntax and formatting settings conflict with the Drupal Coding Standards. Here are a few tips to make PhpStorm play even better with Drupal.

Configuring PHPStorm 3.0 to debug with Xdebug

Overview

This Article explains you how to configure your PHPStorm to work with your local installation of Drupal and debug using XDebug.
If you would like to know how install Drupal or Acquia drupal or XDebug please refer to the hundreds of articles already published.

Installing PHPStorm 3.0

  1. Download trial PHPstorm 3.0 http://www.jetbrains.com/phpstorm/
  2. Install...

Create a Project

It is assumed you already have a full Drupal environment which includes: Apache, MySQL, PHP, Drupal and XDebug
So as a result we have two assumptions:

  • Your local drupal site is at http://mylocalsite (usually its http://localhost)
  • your local drupal code is at c:\path\to\my\local\code
    which is also the DocumentRoot for mylocalsite vhost config in Apache.

So here is what you need to do:

  1. File --> New Project from Exisiting Files
  2. Choose Web Server is installed locally, source files are located under its document root --> Next
  3. enter the path your local Drupal code c:\path\to\my\local\code
  4. Local Server:
Subscribe with RSS Subscribe to RSS - PHPStorm