Phpstorm + xdebug: the remote host is configured as "localhost", even though the server node is probably not local

I followed this instruction to verify my debugger configuration on a web server. I am using a remote server whose FTP connection has been verified, but I get this warning saying

The remote host is configured as "localhost", although the server node is probably not local

enter image description here

My first question is: what does “remote host” and “server host” mean, respectively?

I know that the remote host is the xdebug.remote_host parameter, and according to the xdebug documentation , it is the "host where the debug client is running."

This bothers me: does the IDE debugger client work on my local machine?

If so, should not the "host on which the debug client is running" be my IP address of the local computers? If so, should I configure xdebug.remote_host as my IP?

I tried setting it to my IP address, the warning does not appear, but it does not seem correct, because later I tried it with a random IP address, which also does not appear.

Secondly, the xdebug documentation also says that this xdebug.remote_host parameter will be ignored if xdebug.remote_connect_back turned on. "Although not quite sure what this parameter does, I set it to" On ", as shown in the figure: enter image description here

I was hoping this would clear the warning, but it's still there. So how do I get rid of this message?

+7
debugging phpstorm xdebug remote-debugging
source share
2 answers

In my case, I had several apache virtual hosts for different projects. I managed to access the projects through different URLs, for example: http://projectname1 , http://anotherproject2 .

I was getting the same error in PhpStorm when checking xdebug:

The remote host is configured as "localhost", although the server host is probably not local

The problem was fixed, once in php.ini xdebug.remote_host corresponded to the URL of the project that I was debugging. So, if I were debugging http://project1 , I would get this in php.ini:

 xdebug.remote_host="project1" 

Having values ​​127.0.0.1, or localhost did not fix it.

Hope this helps someone.

+10
source share

Have you tried the following?

xdebug.remote_host = "127.0.0.1"

0
source share

All Articles