WARNING: Do not edit the php.ini files manually. If you try to edit your files with Finder your changes to php.ini will not be applied.
First, are you using MAMP (free) or MAMP Pro
Turns out there is a difference between the php.ini file you edit from MAMP and the php.ini file that PhpStorm uses in the interpreter.
The MAMP Pro php.ini file resides in /Library/Application Support/appsolute/MAMP PRO/conf/php.ini
and doesn’t have a PHP installation (which PhpStorm needs when setting the interpreter). If you run phpinfo(); this is the file you will see data from.
When you set PhpStorm to the necessary location here /Applications/MAMP/bin/php/php5.4.x/bin
it looks at the php.ini file there, not the one that MAMP Pro uses (above). So if you want PhpStorm to see the debugger, you need to add the code to that php.ini file.
STEPS:
With MAMP Pro open, go to File-> Edit Template -> PHP -> Choose the appropriate PHP Version
Now, locate the extensions section of the php.ini file
Add the following line:
zend_extension=xdebug.so
When you’re done, your extensions section should look like something like this (bolded line for emphasis).
; Extensions
MAMP_apc_MAMP
extension=imap.so
extension=gettext.so
extension=mcrypt.so
extension=yaz.so
extension=pgsql.so
extension=pdo_pgsql.so
extension=pdo_mysql.so
extension=imagick.so
extension=tidy.so
zend_extension=xdebug.so
Close the php.ini Edit Template window. MAMP Pro will prompt to restart server, choose Yes.
Important to use the ‘zend_extension’ prefix.
Before sure to make the same changes in php.ini located in the Applications/ folder (substitute the php version number for the version you are using).
/Applications/MAMP/bin/php/php5.5.10/conf/php.ini
This configuration will work with PHPStorm.
Restart PHPStorm. Restart your browser.
Try xDebug it will work.
zend_extension