phpStorm 远程调试选择在远程调试期间发送错误的 IP 地址


phpStorm remote debugging selecting sending wrong ip address during remote debug

>有谁知道如何设置 phpstorm 发送用于远程调试的接口 ip?我正在调试一个远程站点,它不断发送错误的接口(我有几个(

当我开始调试时,它会启动浏览器:

http://192.168.0.251/?start_debug=1&send_sess_end=1&debug_start_session=1&debug_session_id=19689&debug_port=10137&debug_host=169.254.98.211%2C127.0.0.1&debug_stop=1

IP 地址 169.254.98.211 应为 192.168.0.135如果我手动更改它,它可以工作!

那么我在哪里设置这个??

可汗

使用 PHP Web 应用程序调试配置时,用户无法定义debug_host的值,它是硬编码的:

  public static String getDebugHost() {
    try {
      final InetAddress localHost = Inet4Address.getLocalHost();
      return localHost.getHostAddress() + ",127.0.0.1";
    }
    catch (UnknownHostException e) {
      return "127.0.0.1";
    }
  }

解决方法是使用零配置调试,您可以在书签生成器中定义主机 IP 地址。不要被xdebug混淆,Zend Debugger几乎是一样的。