Dev-PHP2.ig: Installing the Debugger

From Dev-PHP
Jump to: navigation, search

1 - Step by step installation

This came from a thread in one of forums (fora ?) [here]

Since these days, we can rely on some customized installations named [CE 2.x] (Compiled Environments for versions 2) and USB flash.

1.1 - Download

  • Download Dev-PHP - of course, we recommend the last version.
  • Download [Xdebug]
  • Download and / or install the corresponding version of [PHP]

1.2 - Install PHP and Dev-PHP ;)

1.3 - Connect Dev-PHP and PHP

  • Run Dev-PHP
  • Create a new project (in short : a new directory)
  • Create a new file 'index.php' containing
  • Menu Option » General options...
  • Select the third tab on the appearing window
  • Fill in the pathname of php_cgi.exe and optionally php.ini (if php.ini is in the same folder as php_cgi.exe there's no need to fill it)
  • Select the fifth tab (Web-server)
  • Check the port number of the local server (usually 8080) and the server timeout (usually 10000)
  • Click on the Ok button
  • Click on the second tab (Internal preview) of the main window of Dev-PHP, or press <F9>

We should see the phpinfo results. Isn't it beautiful ?

1.4 - Copy the file php_xdebug.dll in the "./ext" directory of PHP

1.5 - Edit the PHP.ini (connect PHP and Xdebug)

  • Menu Options » General Options
  • Select the last tab (Debugger)
  • Click on the button 'Set debugger entries'
       this will add a section called xdebug, initialized with the values set in the tab 
       don't modify the "idekey" option, because it's hard-coded at this time 
  • Click on the button 'Ok'
  • Menu Options » Edit PHP.ini
  • Set the key 'extension_dir', near line 500, for instance :
       extension_dir = "C:\Program Files\dev-php2\php\ext\" 
  • Set the zend extension, near line 610, for instance :
       zend_extension_ts="C:/Program Files/Dev-php2/php/ext/php_xdebug.dll" 
  • Save the file PHP.ini
  • Click on the index.php tab
  • Click on the internal preview tab

One should see the phpinfo results with something like

  • with Xdebug v2.0.0beta6-dev, Copyright (c) 2002, 2003, 2004, 2005, by Derick Rethans just after the copyright of Zend Technologies.
  • then, near the middle of the results, all the settings for Xdebug.

1.6 Feel free to check the last Exp version (1.41 MB)