Essential Articles on Remote PHP Debugging with PHPStorm and Xdebug



Enable remote xdebug in php.ini 

you will add a line in php.ini


Test your connection, if it doesn’t work with localhost, try you local network IP address as it depends to which network adapter PHPStorm is using for the debugging purposes.


Mac-Pro:~ mac$ telnet localhost 9000

Trying ::1…

telnet: connect to address ::1: Connection refused


Connected to localhost.

Escape character is ‘^]’.


telnet> exit

?Invalid command

telnet> quit

Connection closed.

Mac-Pro:~ mac$ telnet 9000


Connected to

Escape character is ‘^]’.

Enable xDebug MAMP Pro Mac OSX PHPStorm

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.



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:

When you’re done, your extensions section should look like something like this (bolded line for emphasis).

; Extensions


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).



This configuration will work with PHPStorm.

Restart PHPStorm. Restart your browser.

 Try xDebug it will work.