Manual Install
The following Instructions based on http://xdebug.org/wizard.php help you to install it manually:
- Download the latest version (xdebug-x.x.x.tgz) fromĀ http://xdebug.org/download.php
- Unpack the downloaded file with:
$> tar -xvzf xdebug-x.x.x.tgz
- On shell run:
$> cd xdebug-2.2.3 $> phpize #(See the FAQ if you don't have phpize.
- Result should be:
Configuring for: ... Zend Module Api No: 20090626 Zend Extension Api No: 220090626
Please consider the number! If you got different results, look at http://xdebug.org/docs/install for help.
- Next shell commands:
$> ./configure $> make $> cp modules/xdebug.so /usr/lib/php5/20090626 $> nano /etc/php5/apache2/php.ini
- Change or add the following line:
zend_extension = /usr/lib/php5/20090626/xdebug.so
- Restart the webserver:
$> sudo service apache2 restart $> # or $> sudo /etc/init.d/apache2 stop $> sudo /etc/init.d/apache2 start
Chrome extension
You can use the Xdebug helper extension for debugging with PHPStorm. Under chrome://extensions/ in the options of the extension you should select PhpStorm as IDE-Key. (@see https://confluence.jetbrains.com/display/PhpStorm/Browser+Debugging+Extensions)
Firefox extension
For Firefiox you can use the easiest XdebugĀ or easy Xdebug extension. In Preferences PHPSTORM must be set as IDE-Key.Ā (@see https://confluence.jetbrains.com/display/PhpStorm/Browser+Debugging+Extensions)
Server settings
On server side there is the PHP-Modul php5-xdebug required. And under /etc/php5/apache2/conf.d/ there must exist a xdebug.ini-file (f.e.: 20-xdebug.ini) with the following information:
zend_extension=/usr/lib/php5/20121212/xdebug.so # Attention -> must be the actual number!!!! [XDebug] xdebug.remote_enable=1 xdebug.remote_port=9000 xdebug.profiler_enable=0 xdebug.profiler_output_dir="/tmp" xdebug.remote_host=$CLIENTIP # in virtual environment it is the Host-IP!
PHP-Storm settings
General settings:
Then you have to configure a remote server and debug settings:
On bash
$> export XDEBUG_CONFIG="idekey=16231" $> php -dxdebug.remote_enable=1 -dxdebug.remote_autostart=On -dxdebug.idekey=phpstorm -dxdebug.remote_host=10.0.2.2 product_import.php