我正在为Sublime Text设置PHP的xdebug,但xdebug一直记录与无法连接相关的错误:
Log opened at 2016-08-18 21:06:01
I: Connecting to configured address/port: localhost:9988.
E: Could not connect to client. :-(
Log closed at 2016-08-18 21:06:01
我希望通过直接在浏览器中访问http://localhost:9988
进行调试可能会有所帮助,但它只显示谷歌Chrome错误页面:"localhost拒绝连接"。也许错误存在于另一端,无法将数据推送到sublime text客户端,我不知道。当我运行测试/等时,Sublime Text xdebug确实显示消息“重新加载/var/log/xdebug/xdebug.log”,因此似乎已经意识到正在运行的PHP代码,只是没有进一步操作。
所以,我从未想过要调试xdebug本身,但是:我该如何调试xdebug与代码编辑器之间的连接?如果这是nginx,我会开始调试虚拟主机,但由于它是xdebug......我不知道从哪里开始调试缺少应用程序的问题?
##各种配置设置##
我使用的是ubuntu linux 14.04。
以下是我的xdebug.ini配置文件(如果相关):
[xdebug]
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_host="localhost"
xdebug.remote_handler="dbgp"
xdebug.remote_port=9988
xdebug.remote_mode = req
xdebug.overload_var_dump=0
xdebug.idekey = sublime.xdebug
xdebug.remote_log="/var/log/xdebug/xdebug.log"
;https://github.com/martomo/SublimeTextXdebug
Xdebug已安装:
apt-cache policy php-xdebug
php-xdebug:
Installed: 2.4.0-5+donate.sury.org~trusty+1
Candidate: 2.4.0-5+donate.sury.org~trusty+1
Version table:
*** 2.4.0-5+donate.sury.org~trusty+1 0
500 http://ppa.launchpad.net/ondrej/php/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
模块已激活:
php -m | grep -i xdebug
xdebug
Xdebug
phpinfo xdebug设置:
telnet localhost 9988
时会发生什么? - axiac