php 5.4 + apache 2 + xdebug 2 + Windows

如果配置xdebug有问题,请先配置好php,然后把phpinfo()输出到浏览器的html复制到页面: http://xdebug.org/wizard.php 中的输入框,然后点击按钮:“Analyse my phpinfo() output”,让xdebug帮你决定用哪个php_xdebug.dll。

2013年2月27日 · 1 分钟 · zgia

使用Eclipse PHP Development Tools + xdebug 2.0.0 调试web

Eclipse: Eclipse Platform, Version: 3.3.0, Build id: I20070621-1340 PHP: Version 5.2.0 Xdebug: Version 2.0.0 Apache: Version 2.0.59 1、配置apache+php,网上很多,不细说; 2、配置Xdebug; 1)、下载相应模块:PHP 5.2.1+(php_xdebug-2.0.0-5.2.2.dll); 2)、将下载的dll复制到php.ini所在目录; 3)、编辑php.ini文件,添加: [xdebug] xdebug.remote_enable = 1 xdebug_remote_host = “192.168.1.25” xdebug.remote_port = 9000 xdebug.remote_handler = “dbgp” zend_extension_ts=.\php_xdebug-2.0.0-5.2.2.dll 这些配置比较简单,一看就明白。另,俺上个文章讲的是使用Zend Debugger 5.2.10 + Zend Studio 5.5.0调试web,所以,如果您配置了用Zend Debugger调试web的话,请将 [Zend] zend_extension_ts=.\ZendDebugger.dll zend_debugger.allow_hosts=192.168.1.25 zend_debugger.expose_remotely=always 等4行注释掉。 4)、重启apache,打开浏览器运行:http://192.168.1.25/phpinfo.php,您会看到: 3、配置Eclipse; 1)、可以使用Eclispe的插件功能安装PDT:http://downloads.zend.com/pdt,会用Eclipse的都知道怎么用; 2)、您也可以直接下载org.eclipse.php和org.zend.php.debug,自己安装插件; 3)、Eclipse » Window » Preferences » PHP项; 1)、PHP executables,新建一个,PHP Debugger选择Xdebug。您可以将这个新加的设置默认; 2)、Debug中,PHP Debugger选择Xdebug;Installed Debuggers中,Xdebug的端口设置为您在php.ini中设置的xdebug.remote_port; 3)、Debug子项Launching中,Xdebug不支持“Allow multiple debug sessions”,所以设置为Never即可; 4)、PHP Servers中,您可以根据自己的需要,选择“Publish Projects to this Server”,俺没有选择; 4)、Run » Open Debug Dialog,如图: 请注意:Auto Generate项,如果您的web有子路径,则可能需要自己设置一下。Advanced标签,不选:Open in Browser。Common标签,根据您web的编码,设置Console Encoding。 以上设置后,在Open Debug Dialog的对话框中,点击底部的“Debug”即可进行web调试。以后只要在Run » Debug History中选择此次调试名称就可以了。 在配置中,有很多步骤没有仔细说明,是因为这些步骤是Eclipse的基本概念。 现在eclise和zend studio都可以调试web了,不过我还是喜欢用eclispe。^_^。 相关站点: PDT Project: http://www.eclipse.org/pdt/ Zend.com / pdt : http://www.zend.com/pdt

2007年9月24日 · 3 分钟 · zgia