Clue 1. Verify that you don't have two versions of PHP running on your system. Sometimes it happens if you install new PHP with a package manager, over existing one shipped with OS.
Clue 2. Restart "brew services restart php56" or apache2(apachectl start/stop)
The Steps I go through to install xdebug:
A. Install xdebug with package manager brew install homebrew/php/php56-xdebug
B. Check the list of loaded ini-files with php --ini
Console output:
Configuration File (php.ini) Path: /usr/local/etc/php/5.6
Loaded Configuration File: /usr/local/etc/php/5.6/php.ini
Scan for additional .ini files in: /usr/local/etc/php/5.6/conf.d
Additional .ini files parsed: /usr/local/etc/php/5.6/conf.d/ext-gmagick.ini,
/usr/local/etc/php/5.6/conf.d/ext-igbinary.ini,
/usr/local/etc/php/5.6/conf.d/ext-imagick.ini,
/usr/local/etc/php/5.6/conf.d/ext-intl.ini,
/usr/local/etc/php/5.6/conf.d/ext-ioncubeloader.ini,
/usr/local/etc/php/5.6/conf.d/ext-mailparse.ini,
/usr/local/etc/php/5.6/conf.d/ext-mcrypt.ini,
/usr/local/etc/php/5.6/conf.d/ext-mongo.ini,
/usr/local/etc/php/5.6/conf.d/ext-oauth.ini,
/usr/local/etc/php/5.6/conf.d/ext-opcache.ini,
/usr/local/etc/php/5.6/conf.d/ext-tidy.ini,
/usr/local/etc/php/5.6/conf.d/ext-uploadprogress.ini,
/usr/local/etc/php/5.6/conf.d/ext-xdebug.ini
C. php -m | grep xdebug
- If you have xdebug modules installed, you will see "xdebug" in output.
D. verify "zend_extension=" line that points on xdebug.so. Should be already there if you install with package manager.
E. Check tune settings for xdebug, mine are:
[xdebug]
zend_extension="/usr/local/opt/php56-xdebug/xdebug.so"
xdebug.remote_port=9089 // <-- same in IDE
xdebug.default_enable=1
xdebug.remote_connect_back=1
xdebug.remote_handler=dbgp
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_handler=dbgp
xdebug.idekey=PHPSTORM
xdebug.var_display_max_depth = -1
xdebug.var_display_max_children = -1
xdebug.var_display_max_data = -1
xdebug.max_nesting_level = 1000
F. In PhpStorm set port number to 9089 and select can accept external connections: "X"
Hope it helps. (I'm using mac, but is the same for Linux or Win)