我已经在我的MacBook Pro上安装了xdebug与PHP 5.6.29和sublimeXdebug作为客户端(服务器和客户端都在同一台机器上)。xdebug不能在本地主机上工作
当我连接到互联网和xdebug.remote_host=192.168.0.35
时,它工作得很好。当我将配置指定为xdebug.remote_host=127.0.0.1
或xdebug.remote_host=localhost
时,它不起作用。
我不会一直在互联网上。每次连接到接入点时,互联网地址都会更改。每次连接到互联网时,我都不想去php.ini
文件编辑配置。
我该如何解决这个问题?
在/etc/php.ini
文件我Xdebug的配置是
zend_extension= /usr/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_log="/var/log/xdebug/xdebug.log"
1)你有本地网络服务器(Apache/nginx)吗? 2)如果你这样做 - 他们如何运行PHP - 也许php-fpm? – LazyOne
我正在使用Apache网络服务器。我没有听到你的第二个问题。 – lucifer
呃..好的。 1)请运行此命令并显示结果:'sudo lsof -nP -iTCP -sTCP:LISTEN' - 我需要看看谁在TCP 9000端口2上进行侦听)请为此提供xdebug日志('xdebug.remote_log')成功而不是调试会话。 – LazyOne