Xdebug configuration PHP fastcgi和日蚀?
-
18-09-2019 - |
题
我一直在使用食-pdt结合xdebug和apache没有问题,对于超过一年。事情完美,我可以做所有的交互式调试我想从内蚀(在使用我自己的计算机作为一个服务器)。
现在我从apache服务(并因此PHP运行现在不是作为一个Apache服务,但作为快速cgi) 我不能找到一种方式配置蚀的工作很好地与xdebug.我不确定如果该问题是与xdebug或与蚀(或两者)来确定。
在日食结构,我已经改变了参考PHP配置文件 /etc/php5/cli/php.ini
.
尝试与php.ini版本1
与以下 php.ini
文件
zend_extension=/usr/lib/php5/20060613/xdebug.so
- 我看到xdebug工作(例如,如果我做一个
var_dump()
我得到的xdebug的版本,不平PHP之一) - 我不能具有的交互式调试从蚀:浏览器开辟了和荷载的页面完全具有典型的含URL
...?XDEBUG_SESSION_START=ECLIPSE_DBGP&KEY=...
, 但该程序执行不断点 - 在右下角蚀我看见一个可疑的信息: "发射=put_the_name_of_my_project_here=:57%" 这一交替的 "清爽的工作空间" 一个。
尝试与php.ini2版
如果我使用这种其他版本的文件(这是什么它的工作,直到我换服务器):
zend_extension=/usr/lib/php5/20060613/xdebug.so
xdebug.remote_enable=On
xdebug.remote_autostart=On
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_mode=req
我不能访问的任何网页的我的网站。
PS:额外的数据在我的机器:- 操作系统: GNU/Linux-Ubuntu9.10 64位。- PHP: 5.2.10-2ubuntu6.3Suhosin修补0.9.7;Zend Engine v2。2.0,Copyright(c)1998-2009年Zend技术与Xdebug v2。0.4 - 日食: 见。
解决方案
什么男朋友说的是正确的(不能投票,因为我是新的!).
一般来说,addging/etc/php5/cgi/php.ini(或找到php.ini)的线条就像
zend_extension = /PATH_TO/xdebug.so ## <-- NOTE the absolute path, not relational (For ex on Windows: "C:\nginx-1.9.13\php\ext\php_xdebug-2.6.0RC2-7.0-vc14-nts.dll")
xdebug.remote_enable = on
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.remote_port = 9900 ## <-- Yours will be probly 9000 or other..
不会的工作。
所以之后的变化,
./php-fastcgi stop
./php-fastcgi start
这为我工作。
其他提示
xdebug和FastCGI使用同样的默认港口(9000).改变口的XDebug在你php.ini文件是这样的:
xdebug.remote_port=9001
和更新你的IDE设置使用9001认证。
尝试重新启动php.因为你有php-fastcgi,重新启动服务似乎并没有做到这一点。当我入侵了我的整个服务器的变化生效。
我有同样的问题和解决它。
在文件 /etc/php5/apache2/php.ini
添加:
[xdebug] xdebug.remote_enable=On
xdebug.remote_autostart=off
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_mode=req
在文件 /etc/php5/cli/php.ini
添加:
zend_extension=/usr/lib/php5/20060613/xdebug.so
xdebug.remote_enable=On
xdebug.remote_autostart=off
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_mode=req
重新启动Apache:
sudo service apache2 restart
问题解决方案是"xdebug.remote_autostart=上".如果你在文件中设置配置"xdebug.remote_autostart=上".这将力Xdebug开始调试届会议对每一请求完成对该服务器,而不具有指定的请求,一个调试届会议被通缉。
你需要改变
"xdebug.remote_autostart=off"
并重新启动网服务。在这个例子是Apache.
你可以阅读这里: http://doc.waterproof.fr/phpedit/debugging_profiling/configuration/debugger_with_xdebug
好运!