Install Xdebug
1. Get phpize: sudo apt install php7.0-dev
2. Get Xdebug, goto http://xdebug.org/find-binary.php and follow the instructions.
3.Edit two php.ini file:
sudo gedit /etc/php/7.0/cli/php.ini,
sudo gedit /etc/php/7.0/apache2/php.ini
add the text below:
;xdebug configuration
zend_extension = /usr/lib/php/20151012/xdebug.so
xdebug.remote_host = 127.0.0.1
xdebug.remote_enable = 1
xdebug.remote_port = 9000
xdebug.remote_handler = dbgp
xdebug.remote_mode = req
xdebug.idekey=PHPSTORM
Install Xdebug helper extension
1. In the chrome menu, goto settings and select extensions menu
2. serach for "xdebug helper" keywords get the extension
3. click "add to chrome" button to install
Config Xdebug helper
1. right click xdebug helper icon select options
2. For the "IDE key" section, select phpstorm and save
Config phpstorm
1. Goto File->Settings->Languages & Frameworks->PHP, set Development Eviroment.
1. GotoFile->Settings->Languages & Frameworks->PHP->Servers, set local server.
1. Goto File->Settings->Languages & Frameworks->PHP->Debug, set simultaneous connections to 3
2. Goto File->Settings->Tools->Web Browsers, set default browser(For example:chrome).Edit Path for chrome to the location of the excute file(For example:/usr/bin/chromium-browser)
3. Goto Run->Edit Configurations, click + button select "php build in web server", set Name Host Port and save.