坦率地说,我也有 2 天非常糟糕,我现在不知道最终解决了什么问题,
所以这是我收集的注意事项和陷阱:
; 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 部分到这个端口和 session id。
Here 是一个脚本,用于检查(通过 php 方式)您打算与之通信的端口是否打开。 (下面还有 cmets,对于那些懒得从图片中打字的人来说)
为了让您的浏览器能够连接,不要开始忘记(在沮丧中)始终附加调试启动 get-argument:
http://localhost/myTest.php?XDEBUG_SESSION_START=netbeans-xdebug
在港口边境,this tool 也可能有所帮助。
四重检查,您将 VC6 和 VC9 编译版本的所有内容分开。
从命令行运行whatever/path/php.exe myTest.php(一旦完成上述设置)也可能会显示其他错误(确实如此,而我正在修补不正确的 dll)。
我可以推荐http://www.wampserver.com
(出于个人原因,它比流行的 xampp 包更适合我......)