Guide on how to setup XDebug with PHPStorm.
Versions:
When the debugger cannot connect or refuses the connection, check the following: Make sure Xdebug or Zend Debugger are configured to connect to the host and port PhpStorm is running on. In the Xdebug configuration, make sure xdebug. remote_host and xdebug.
This guide is only for PHP7, Mac El Capitan, PHPStorm 2016.3
brew install php70
Install nginx
Guide - http://learnaholic.me/2012/10/10/installing-nginx-in-mac-os-x-mountain-lion/
Config - https://gist.github.com/kmaxat/c07795ab88677efb843686d075fafa9e
brew install php70-xdebug
Create info.php file in public folder of laravel:
info.php: <?php phpinfo();
Edit file /usr/local/etc/php7.0/conf.d/ext-xdebug.ini
zend_extension="/usr/local/opt/php70-xdebug/xdebug.so"
xdebug.remote_enable = 1
xdebug.remote_connect_back=1
xdebug.remote_port = 9001
xdebug.scream=0
xdebug.show_local_vars=1
xdebug.idekey=PHPSTORM
Restart nginx sudo nginx -s reload
or brew services restart nginx
Restart php-fpm brew services restart php70
Go to localhost/info.php, you should be able to see xdebug. Part of the image:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With