坦率地说,我也有 2 天非常糟糕,我现在不知道最终解决了什么问题,所以这是我收集的 Do 和陷阱:
; this is the thread safe version,
; the absence of _nts_ in the dll name 'shows' this
; do not use _ts, your library won't get registered and won't show in phpInfo()
zend_extension = "D:/wamp/bin/php/php5.3.8/zend_ext/php_xdebug-2.1.2-5.3-vc9-x86_64.dll"
检查您的 php.ini,检查 phpinfo() 如果所有值(到达)
xdebug.remote_enable = on
xdebug.remote_handler=dbgp
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
; if you have multiple virtual hosts ( like 'local.fooclient' )
; maybe using the IP is safer (for any same-machine-debugging)
xdebug.remote_host=127.0.0.1
; maybe a -much- lower port helped, 84 was free. use netstat to figure out.
xdebug.remote_port=84
; idekey! also see note below
xdebug.idekey=netbeans-xdebug
更多陷阱:
我在网上多次看到 xdebug.remote_handle(没有 r)的错字。谨防。
关于 idekey 的注释:上面的 idekey 确实在 phpinfo() 中显示为主值,但被 MYMACHINENAME$ 之类的“本地值”覆盖。==> 设置一个名为 DBGP_IDEKEY 的全局环境变量(在计算机属性中)并重新启动(或者可能只是注销)到(也)netbeans-xdebug 有帮助!再次:重新检查 phpInfo() 生效。
当然将 netbeans-menu:options->php tab->debugging 部分调整为此端口和会话 ID。
这是一个脚本,用于检查(通过 php 方式)您打算与之交谈的端口是否打开。(下面也在评论中,对于那些懒得从图片中输入的人)
为了让您的浏览器能够连接,不要开始忘记(在沮丧中)始终附加调试启动 get-argument:
http://localhost/myTest.php?XDEBUG_SESSION_START=netbeans-xdebug
在港口边境,这个工具也可能会有所帮助。
Quadruplecheck 您将所有内容的 VC6 和 VC9 编译版本分开。
whatever/path/php.exe myTest.php
从命令行运行(一旦完成上述设置)也可能会显示其他错误(确实如此,而我正在修补不正确的 dll)。
我可以推荐http://www.wampserver.com
(出于个人原因,它比流行的 xampp 包更适合我......)