Eclipse Symfony

Much has been written about debugging PHP in eclipse, yet for all the blogs and tutorials I have had no end of problems. My setup was complicated by the fact that I was trying to debug command-line scripts using the symfony framework. Only the last part was really symfony-dependent, however. Here is what finally worked for me.

  1. Eclipse Symfony 4
  2. Eclipse Symfony Project
  3. Eclipse Symfony 4 Plugin

My setup:

Either for Zend or Symfony, to use it in eclipse PDT, you need first to download it from the official web site ( zend's latest download page, Symfony's download page ). Then, add the library to eclipse (Window - Preferences - PHP - PHP Libraries and then new, navigate to the downloaded directory). Finally, after creating the project, right-click on it, Include Path - Configure Include Path - Add Library - Choose User Library then next and select the needed libraries. Vamos a configurar las cosas que nos hacen falta para trabajar con symfony en eclipse. Instalaremos: PDT, Symfony, Yedit y C.

Eclipse Symfony 4

  • Windows XP
  • PHP 5.2.6
  • Eclipse 3.3
  • Symfony 1.0.11

Introduction There are a number of times I've had to use HTTP cookies for some of the Symfony projects I've developed at Taft College. There is some documentation on using cookies, but you really need to look at either the API documentation or search online for various references to get good examples on how to. Klan serial 2020. Symfony eclipse plugin. Contribute to pulse00/Symfony-2-Eclipse-Plugin development by creating an account on GitHub. Enabling Symfony After installing the Symfony plugin, you will need to make your project Symfony aware. To add Symfony to your project: In the PHP Explorer, right-click your project and select Configure Add Symfony Support.

Debugger Choice: Zend

First I needed to decide on a debugger. In the end I found that Xdebug caused nasty PHP crashes at the end of some runs. I’m not sure why I had this problem, but I wound up using Zend.

Eclipse, servers, and clients

Eclipse 3.3 comes with debug clients for Xdebug and Zend debugger built-in. If you look in Window -> Preferences, PHP -> Debug -> Installed Debuggers, you should see them there. This does not mean, however, that you have everything you need ready to go.

PHP must also be configured (in php.ini) with debugging support. This involves loading an extension for Zend debugger or Xdebug. Eclipse comes with a version PHP configured with Zend debugger. On my system it was here:

C:Program Fileseclipsepluginsorg.zend.php.debug.debugger.win32.x86_5.2.10.v20070905resourcesphp5php.exe

The key to this is that in that same directory is a php.ini that loads ZendDebugger.dll (also in the same directory).

Eclipse Symfony Project

Furthermore, Eclipse seems to require that your PHP have debugging support built in, even when you Run (not Debug).

Other considerations

The Zend debugger slows down PHP significantly. I didn’t want to have it enabled by default. So, I created a separate ini file that includes the Zend debugger and told Eclipse to use it.

My code used MySQL, so I needed at least that extension loaded in PHP.

The Steps

  1. Install everything (Apache, PHP, Eclipse, Symfony, etc.)
  2. Find ZendDebugger.dll in your eclipse plugins dir (see path above for a hint)
  3. Copy it to your PHP extensions dir (a subdir of your main PHP dir)
  4. Create a copy of php.ini called php-debug.ini
  5. In php-debug.ini add the following (substituting in the proper path to PHP):
  6. zend_extension_ts=”C:/Program Files/PHP/ext/ZendDebugger.dll”

  7. In Eclipse, go to Window -> Preferences, PHP -> PHP Executables
  8. Click Add
  9. Specify a name that you will recognize
  10. In Executable path, find your standard php.exe (not part of Eclipse)
  11. In config path, specify php-debug.ini
  12. Choose Zend Debugger
  13. Add
  14. Now, to run or debug you will need to choose the PHP Executable that you created.


To make it work with symfony, create the following file, named bootstrap.php, in your project root dir:

// From symfony.bat
ini_set(‘html_errors’, ‘0’);
ini_set(‘open_basedir’, ”);
// ‘Calls’ the php script symfony

Then, to run a symfony command, for example symfony test-unit Foo, you would do the following:

  1. Go to Run -> Open Run Dialog (or Open Debug Dialog)
  2. Make sure PHP Debugger and PHP Executable are set correctly.
  3. Specify bootstrap.php as the php file to run
  4. In the php script arguments, put the symfony parameters (e.g. test-unit Foo)

For regular symfony commands you would still do it straight from the command-line, or using Symfoclipse. This is useful for unit tests and the like where it would invoke your code.


Sometimes, PHP executables that are created are not made available in the Run or Debug dialogs. I don’t know why, but creating new PHP executables (without removing the old ones first) seems to work around the problem.

Eclipse Symfony 4 Plugin

Tags: Eclipse, PDT, PHP, Symfony