我正在使用Netbeans调试PHP。我无法访问php.ini,因此我使用.htaccess
php_value xdebug.remote_host "localhost"
php_value xdebug.idekey "netbeans-xdebug"
php_flag xdebug.remote_autostart Off
php_flag xdebug.remote_enable On
php_value xdebug.remote_port 9000
php_value xdebug.remote_handler dbgp
php_flag xdebug.profiler_enable on
php_flag xdebug.remote_connect_back On
php_flag xdebug.extended_info Onsub.mydomain.com使用端口8080和8090运行。我以前在这台服务器上使用过xdebug和Eclipse。
sub.mydomain.com服务器的phpinfo()将xdebug与上面的设置一起列出:
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with Xdebug v2.1.3, Copyright (c) 2002-2012, by Derick Rethans在Netbeans中,我配置了"properties“和"run configuration”条目,端口和id也匹配(9000,netbeans-xdebug)。
sub.mydomain.com上有很多开发人员,如果有人使用9000端口,这会不会是个问题?
但是,如果我在Netbeans中运行"debug“,就会永远出现”等待连接“。
我该怎么做?
编辑:固定为localhost
发布于 2012-05-25 21:14:13
我已经使用以下配置启动了调试器:
php_value xdebug.remote_host "192.168.1.149"
php_value error_reporting 22527
php_flag xdebug.remote_autostart Off
php_flag xdebug.remote_enable On
php_value xdebug.remote_port 9009
php_value xdebug.remote_handler dbgp
php_value xdebug.remote_log "..."
php_flag xdebug.profiler_enable off
php_flag xdebug.extended_info On
php_flag xdebug.coverage_enable On
php_value error_log "..."发布于 2012-05-22 16:07:59
这是错误的:
php_value xdebug.remote_host "sub.mydomain.com"xdebug.remote_host设置需要包含安装了集成开发环境的计算机的IP。当然,这也意味着运行PHP/Xdebug的机器需要能够连接到该IP地址。这在http://xdebug.org/docs/remote#communication上也有记录
https://stackoverflow.com/questions/10684899
复制相似问题