Problem: PHPStorm will let you debug something running on a server running XDebug. But it never connects

Context: Server is a Bitnami Magento stack running on VMWare. Configured XDebug by commenting out the lines at end of php.ini

Solution: The problem is the line:

xdebug.remote_host=127.0.0.1

This is the default line added by Bitnami to php.ini. But if you are connecting remotely, even from the same machine outside the VM, you have to put the address of the machine you are debugging from there.

Find your IP address. The easiest way is to go to the command line and type:

ifconfig

Then look for IP addresses in there. It is probably the one on en0.

You can also look at the php variable:

 _SERVER[“REMOTE_ADDR”]

Which you can get from a phpInfo() call.