Joomla extensions have moved!

Galaxiis (formely www.waltercedric.com) creates industry leading premium Joomla Extensions and is the longest running Joomla extensions provider since 2005.

Powerful Joomla extensions. - Excellent documentation. - Amazing support.

Visit now www.galaxiis.com

The PDT project is working towards providing a PHP Development Environment framework. This project was formerly known as PHP IDE.

Make Eclipse PDT work for Joomla development

Install a PHP debugger

In order to be able to perform debugging using eclipse PDT, you must download one of the following extra packages:&160; XDEBUG or ZEND debugger. I was not able to get the debugger running with XDEBUG even after reading many tutorials and trial error approach. Both packages are free, and it has work nicely for me with ZEND debugger after 5 minutes...

Unfortunately, XDEBUG/ZEND can not be packaged with PDT due to license restrictions, so both tools are not just running out of the box without few efforts.

PDT and Zend Debugger

Download

PDT + Zend in one package thanks to Zend.com (118MB), highly recommended

OR PDT (105MB) and add Zend debugger through software update later

  • Open Eclipse and go to Help-> Software Updates-> Find and Install
  • Select "Search for new features to install" and click "Next"
  • Create a New Remote Site with the following details:
  • Name: PDT
  • URL: http://downloads.zend.com/pdt
  • Check the PDT box and click "Next" to start the installation

XAMPP, Zend debugger working together

open the php.ini located at \xampp\apache\bin\php.ini

and add the following

[DEBUGGER]
zend_extension_ts=
E:\php\bin\eclipse\plugins\org.zend.php.debug.debugger.win32.x86_5.2.15.v20081217\resources\php5\ZendDebugger.dll
zend_debugger.allow_hosts=127.0.0.1/192.168.1.100
zend_debugger.expose_remotely=always

Notes:

  • Only one key zend_extension_ts is allowed per php.ini file, un-comment all other or it wont work,
  • Attention: I did not move ZendDebugger.dll but use the one coming with eclipse Zend plugin, this may cause issues, if you update this plugin and the path change...

Restart XAMPP apache

By going to http://localhost/xampp/phpinfo.php check that you have a section Zend Debugger

zend.debugger.active.in.xampp

Put now a breakpoint in index.php of any Joomla! installation or deeper in any component you want to debug

And right click on index.php, debug as PHP Web Page (Alt-Shift-D, W)

Attention

While the first page get properly rendered in the internal browser of eclipse PDT, I was getting some strange rendering issues (html code produced look fine), by using an external browser like Chrome, Firefox, the problem has disappear.

PDT and XDebug

Installing with PEAR/PECL is as easy as opening a command prompt and typing

# \xampp\php\pecl install xdebug

open the php.ini located at \xampp\apache\bin\php.ini

and un-comment the following

extension=php_xdebug.dll

and

[XDebug]
;; Only Zend OR (!) XDebug
zend_extension_ts="e:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9001
xdebug.remote_handler=dbgp
xdebug.profiler_enable=0
xdebug.profiler_output_dir="\xampp\tmp"

Caveats:

  1. Modify the correct php.ini file, check the page phpinfo, normally the right php.ini is located at \xampp\apache\bin\php.ini
  2. You need to comment out any other references to &8220;zend_extension_ts&8221; in the php.ini file (the zend optimizer use it already as default)
  3. Restart apache, and check the page http://localhost/xampp/phpinfo.php to make sure XDebug has been successfully installed

debugging AkoBookPlus:

debugging.joomla.components

&160;

Add subversion plugin

Install subversive by pointing the update manager to subversive update site

svn.subversive.install

You need also to install SVN connectors by adding a new update site:

http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/ - [required] Subversive SVN Connectors

svn.subversive.install.connector&160;

Eclipse will restart, you should be able to browse www.joomlaCode.org repositories.

Happy Joomla! development and PHP debugging!

You might like also

PHP Code Snippet to retrieve Data from WikiPedia
This interesting code snippet is from cedTag and let you retrieve WikiPedia description using OpenSearch API. It use the Client Url Library cURL. Released under GPL v3 /** * @param $searchTerm * @param string $wikipediaServer * @return array|string [text, description, url] */ public function getDefinitionFrom ($searchTerm, $wikipediaServer = 'http://en.wikipedia.org') return ""; } …
2438 Days ago
XAMPP 1.8.0 Xdebug stop working and make segmentation fault
There's a new version of Xdebug released which fixes a major bug where inspecting static properties caused Xdebug to crash in XAMPP 1.8.0. Unfortunately, you’ll need to update manually the version of Xdebug shipped with XAMPP to Xdebug 2.2.1 rather than 2.2.0: Simply download the correct Xdebug binary (VC9 threadsafe PHP 5.4 VC9 TS (64 bit) (MD5: 81cacc87168c99c7f65ba202dc12c4b2)) and copy it in your XAMPP installation at xampp\php\ext\php_xdebug.dll restart Apache and you can continue debugging! …
2556 Days ago
Install PHPUnit and PHPDocumentor in XAMPP
Open XAMPP Shell (start c:\xampp\xampp-control.exe and click on the button XAMPP-Shell), and run: pear channel-discover pear.phpunit.de pear channel-discover components.ez.no pear channel-discover pear.symfony-project.compear install --alldeps phpunit/PHPUnitpear install phpunit/DbUnit phpunit/PHPUnit_Seleniumpear install phpunit/PHPUnit_SkeletonGenerator pear install phpunit/PHPUnit_Story phpunit/PHP_CodeCoveragepear install PhpDocumentor …
2560 Days ago
Eclipse Foundation, Zend Technologies, and IBM Announce the Approval of the PHP IDE Project
The major news I was waiting for:Eclipse Foundation, Zend Technologies, and IBM Announce the Approval of the PHP IDE Project The Eclipse Foundation, an open source community committed to the implementation of a universal software development platform, Zend Technologies and IBM, today announced that the Eclipse PHP IDE project has been approved by the Eclipse Foundation. The technology project was proposed by Zend and IBM on October 21, 2005. It will deliver a PHP Integrated Development Environment framework for the …
4900 Days ago
Recommended PHP reading list
An impressive sum of links and good articles on PHP, worth reading!This list of recommended reading material on PHP is compiled from a variety of online sources by Web application developers in IBM's Global Production Services organization. These resources have been selected with the intention of introducing IT specialists and architects to PHP, providing specific information about development and maintenance, and helping to integrate the technology with IBM products.PHP is an interpreted programming language run in an environment provided by …
4905 Days ago