First Install xdebug
apt-get install php-xdebug
using command line
php -i | grep xdebug
or phpinfo.php , save following in your webroot dir, by default /var/www/ (This is recommended, this will help in future as well)
Now, make sure remote_enable is “On” in phpinfo.php page or command line output. if not then
sudo vim /etc/php5/apache2/php.ini
at the end of the file add
verify using the above steps make sure that it says remote_enable = “On”
Open PHPSTROM, open your php project.
Go to Menu , click on Run -> Break at First Lines in PHP Scripts
then click on Run -> Start Listen PHP Debug connections
Install xdebug-helper in your chrome
type in address bar of chrome chrome://extensions/ , search for xdebug helper, click on options,
In IDE Key section choose “Other” in dropdown and put PHPSTROM in textbox.
Now, open your php project in chrome, in address bar, next to star you will see a bug click on that and click “Debug”, bug must turn green , refresh the page, It must break in PHPSTROM first line. If that doesn’t work, Put comments, I will try to help you guys see ya for now