

– Name: localhost (Same as PHP_IDE_CONFIG in docker-compose.yml)



įinally, we have to tell the IDE how to communicate with Xdebug. Restart Apache, then make sure Xdebug is loading by looking at phpinfo. Then find and uncomment the following lines in /etc/php.ini zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so" If /etc/php.ini doesn't exist, create a copy of the default file with the following command: sudo cp /etc/ /etc/php.ini To do that, open up /etc/php.ini with your text editor. Once you have Xdebug installed, we need to make it available to PHP by editing the php.ini file. If you're using the earlier OSX Lion version, you can download and install Xdebug with PECL (PHP Extension Community Library) or Homebrew. OSX Mountain Lion conveniently ships with Xdebug. The recently release Mountain Lion version makes it easy by shipping with many of the tools we need for PHP debugging. In previous versions of Mac OS X, installing Xdebug could be a hassle. A debugger gives you the ability to trace your code line-by-line, with the call stack and all the variables available for inspection at run-time. Using a PHP Debugger is a great way to effectively debug your code.
