[英]xdebug does not work on localhost
I have installed xdebug on my MacBook Pro with PHP 5.6.29 and using sublimeXdebug as client (both server and client are on same machine). 我已在装有PHP 5.6.29的MacBook Pro上安装xdebug,并使用sublimeXdebug作为客户端(服务器和客户端都在同一台计算机上)。
It works perfectly fine when I connected to internet and xdebug.remote_host=192.168.0.35
. 当我连接到Internet和
xdebug.remote_host=192.168.0.35
时,它工作得很好。 It is not working when I specify the configuration as xdebug.remote_host=127.0.0.1
or xdebug.remote_host=localhost
. 当我将配置指定为
xdebug.remote_host=127.0.0.1
或xdebug.remote_host=localhost
时,它不起作用。
I won't be on internet all the time. 我不会一直上网。 And the internet address changes every time I connect to access point.
每次我连接到接入点时,Internet地址都会更改。 I don't want to go the
php.ini
file to edit the configuration each and every time I connect to internet. 我不想每次都连接到Internet时去
php.ini
文件来编辑配置。
How do I fix this? 我该如何解决?
My Xdebug configuration in /etc/php.ini
file is 我在
/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"
Use this in your php.ini: 在您的php.ini中使用它:
xdebug.max_nesting_level = 10000 xdebug.max_nesting_level = 10000
xdebug.remote_autostart = 0 xdebug.remote_autostart = 0
xdebug.remote_enable = 1 xdebug.remote_enable = 1
xdebug.remote_port = 9000 xdebug.remote_port = 9000
You can try having xdebug.remote_autostart = 1 instead of 0 above to just try things out and see if it is working. 您可以尝试让xdebug.remote_autostart = 1而不是上面的0来尝试一下,看看它是否有效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.