
If you are trying to remote debug a website with Xdebug from outside your local network be sure port 9000 is not blocked on your network. Using the “Debug” command will open up the signal manually and open the direct connection to the remote server. Then, unlike local testing that uses “Start Listening for PHP Debug Connections” use Run | Debug instead. To start receiving requests from the remote server enable “Debug” with Xdebug helper in Google Chrome on the page you want to debug. Using PhpStorm with Xdebug on a Remote Server Set the server and the Ide key (session_id) to PHPSTORM.Under PhpStorm | Preferences > Languages & Frameworks > PHP > Servers add a server using port 80 and set the Absolute path on the server.Under PhpStorm | Preferences | Languages & Frameworks | PHP | Debug be sure Xdebug is set to port 9000 (or 9001 if you need to switch the port).Now that Xdebug is installed we are ready to configure a “PHP Remote Debug” for PhpStorm. Sudo service nginx restart Configure PHP Storm In my case, that is nginx and php7.0-fpm. To load the new configurations reload your PHP and HTTP server services. To set this cookie, I use the Chrome Browser extension Xdebug helper. In the browser, the Xdebug and PhpStorm will look for a cookie called XDEBUG_SESSION with the value PHPSTORM. Since I use PhpStorm for Debugging I set my Xdebug key to PHPSTORM. In the guest php.ini file add: xdebug.remote_enable = 1 In my case, the guest is the Vagrant Homestead VM. To use Xdebug remote debugging on a host computer, you need to enable remote debugging on the guest server. Zend_extension = /usr/lib/php/20151012/xdebug.so Enable Remote Xdebug Edit /etc/php/7.0/cli/php.ini and fpm and add the line.Please follow this FAQ entry and skip the next step.

If it does not, you are using the wrong phpize. Run: phpize (See the Xdebug FAQ if you don’t have phpize.)Īs part of its output it should be like: Configuring for:.

Unpack the downloaded file with tar -xvzf xdebug-2.4.0.tgz.
INSTALL XDEBUG PHPSTORM DOWNLOAD

INSTALL XDEBUG PHPSTORM INSTALL
Then follow the instructions the wizard supplies.Īlso, if you are using macOS (formerly OSX), you may need to run brew install autoconf and need to install PHP using homebrew. Send the text file information into the wizard at Xdebug Wizard. sudo php -i > ~/php-info.txt Use the Xdebug Wizard I like to save mine to a file called php-info.txt. Next output your php.ini information into a file or place you can get to the information. So, I have PHP 7 already installed and working with Nginx. In my case, I’m using the Larval Homestead PHP 7 branch with Vagrant and the VirtualBox provider. Should give you something like: PHP 7.0.0-2+~trusty+1 (cli) ( NTS ) Ubuntu 15 and lower will not come with a package for PHP7 or its xDebug counterpart.įirst, be sure you are using PHP 7 already by checking your version. To install Xdebug for PHP7 on Ubuntu you will need to do so manually.
INSTALL XDEBUG PHPSTORM MANUAL
Xdebug deepens debugging PHP apps and websites to a level you can’t receive from the manual process of using code level var_dump().
