行业知识
Visual Studio Code Debug PHP (Xdebug3.0+)
2026-10-18 20:56:34
来源:互联网转载
���文主要针对Xdebug3.0+版本,在window下配置方法。操作步骤如下:
1. 执行 php -i,如下图:
2.打开Xdebug: Support — Tailored Installation Instructions,复制一步内容至文本框。并执行
3.下载指定的扩展,并配置php.ini
[XDebug]zend_extension=php_xdebugxdebug.output_dir="d:\xampp8.2\php\xdebug\output"xdebug.start_with_request = yesxdebug.mode = debugxdebug.client_host = localhostxdebug.client_port = 9000
4. 配置vs code,打开查看->控制面板 搜索“settings.json”。将php.validate.executablePath设置为php地址。
5. 点击运行调试,弹出设置“launch.json”.配置端口号
6.配置完成,设置断点调试。