Reputation: 341
I have just purchased a new pc, and installed Ubuntu 14. PHP, Apache, MySQL. Everything is running fine but Xdebug is not working on PhpStorm. Please help me on how to install Xdebug and integrate it with PhpStorm.
Upvotes: 3
Views: 2057
Reputation: 341
First, install XDebug, this assumes you already have a LAMP stack installed with Apache, PHP, MySQL:
sudo apt-get install php5-xdebug
Now update the options in PHP.INI - /etc/php5/apache2/php.ini
zend_extension="/usr/lib/php5/20121212/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.max_nesting_level=300
Restart Apache2, and you are ready to go!
sudo service apache2 restart
Now go to phpstorm -> settings -> Language & Frameworks -> PHP -> Debug
Make sure the debug port is 9000
now press the start listening for php debug connections button (a phone receiver icon)
enjoy the debugging... :)
Upvotes: 5