- 下载 PHP for eclipse (PLUGIN eclipse)
使用更新网址
https://download.eclipse.org/tools/pdt/updates/7.0
- 下载 XAMPP for windows 并安装
https://www.apachefriends.org/es/download.html
现在您可以按照此处的替代说明进行操作,或者继续到下一点我将解释您需要做什么。
http://robsnotebook.com/php_debugger_pdt_xdebug
安装 XAMPP 后,您应该启动 Apache
下载 Xdebug 例如http://xdebug.org/files/php_xdebug-2.9.2-7.2-vc15-x86_64.dll 并检查它是否正确安装。按照接下来的说明进行操作
1. Download php_xdebug-2.9.2-7.2-vc15-x86_64.dll.
2. Move the downloaded file to C:\xampp\php\ext
3. Update C:\xampp\php\php.ini and change the lines
[XDebug]
;; Only Zend OR (!) XDebug
; zend_extension_ts="C:\xampp\php\ext\php_xdebug.dll"
; Modify the filename below to reflect the .dll version of your xdebug
zend_extension = C:\xampp\php\ext\php_xdebug-2.9.2-7.2-vc15-x86_64.dll
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1 ; if debugging on remote server,
; put client IP here
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=0
xdebug.profiler_output_dir="C:\xampp\tmp"
4. Restart the XAMPP webserver in your XAMPP control Panel
注释掉 php.ini 中的任何 Zend Optimizer,因为它与 XDebug 不兼容。例如,所有这些都应该被注释掉(使用“;”):
[禅德]
; zend_extension_ts = "C:\xampp\php\zendOptimizer\lib\ZendExtensionManager.dll"
; zend_extension_manager.optimizer_ts = "C:\xampp\php\zendOptimizer\lib\Optimizer"
; zend_optimizer.enable_loader = 0
; zend_optimizer.optimization_level=15
;zend_optimizer.license_path =
检查它是否与 phpinfo 一起工作。您转到浏览器并转到:
http://localhost/dashboard/phpinfo.php
或在您的 c:/xampp/htdocs 中创建
调用 phpinfo 的文件,例如
http://localhost/phpinfocall.php
在eclipse中配置PHP调试
您可以创建一个 PHP 项目。该项目应该指向 C:\xampp\htdocs
C:\xampp\htdocs 是 xampp 中的 localserver 根文件夹。在里面你可以创建子文件夹。
配置eclipse的PHP首选项
用xampp的php解析器连接eclipse
配置此项并检查是否在 eclipse 中从 xampp 检测到 xdebug
如何从项目中的 PHP 文件创建调试视图
调试视图配置如下,
最后,您将在调试透视图中看到,调试器会在您的 php 文件的第一行自动停止。