PHP Debugging feature does not work from home

Hello,

I have PHPStorm 8 Installed on my Mac and I have LAMP running on vagrant.  The debugging works flawlessly when I am at work.  But it stops working when I get home.  I believe this happens because I have the following line in my php.ini :xdebug.remote_host=10.16.24.204 ; IDE-Environments IP, from vagrant box.  This IP must change once I get home.  So, I do I know what the IP is for the IDE enviornment?

1 comment
Comment actions Permalink

Hi there,

Yes -- you need to have correct IP.

Few options:

1) Specify IP manually -- you may look at what $_SERVER['REMOTE_ADDR'] has (i.e. have some scrip that will provide you such info) and alter your xdebug config as necessary (yes, you will have to do this every time, unless you can create multiple configs and switch between them)

2) Somehow configure your Vagrant to always use the same IP for your host where IDE is running

3) Use `xdebug.remote_connect_back = 1` in your php.ini -- it tells xdebug to autodetect IP address (check xdebug website for details). Considering that you are using vagrant it is safe to use.

4) Debug using SSH tunnel and XDebug proxy

0

Please sign in to leave a comment.