HoneyMoose
  • 首页
  • Java
  • Jersey
  • Jira
  • Confluence
  • U.S.
    • USRealEstate
    • USVisaTrack
    • H1B
  • 项目和网站
    • CWIKI.US
    • OSSEZ 社区
    • WIKI.OSSEZ.COM
    • BUG.OSSEZ.COM
    • RSS.OSSEZ.COM
BLOG.OSSEZ.COM
A responsive blog theme focused om user reading experience
  1. Home
  2. Computer Science
  3. This article

PHP Windows 下 XAMPP 的 xdebug 配置

2023年02月25日 49Browse 0Like 0Comments

在 IntelliJ 下调试 PHP 的断点有时候还是比较困惑的。

同时根据你使用的 xdebug 配置也有关系。

xdebug 2.x

下面的配置是 xdebug Version 2 的配置,如果你使用 xdebug 3.x 版本的话,配置是不同的。

[XDebug]
zend_extension = "php_xdebug.dll"
xdebug.remote_autostart = 1
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "/xampp/tmp"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_log = "/xampp/tmp/xdebug.txt"
xdebug.remote_port = 9000
xdebug.trace_output_dir = "/xampp/tmp"
xdebug.remote_cookie_expire_time = 36000

xdebug 3.x

下面的配置是 xdebug 3.x 版本的配置,这个版本的配置已经有了不少的修改。

如果直接使用 xdebug 2.x 版本的配置的话,可能会遇到 IntelliJ 断点不停的问题。

[XDebug]
zend_extension = "xdebug"
xdebug.mode=debug
xdebug.client_host = 127.0.0.1
xdebug.client_port = "9003"
xdebug.start_with_request=yes

 

2023-02-25_08-21-26

 

改变

从 xdebug 3.x 开始,默认的调试端口使用了 9003 的端口,这个与 xdebug 2.x 使用的 9000 端口是不一样的。

这个需要注意。

另外:xdebug.start_with_request=yes 参数必须要添加,否则 IntelliJ 的断点不停。

官方的这篇文章:Configure Xdebug | IntelliJ IDEA Documentation 非常值得参考,最好仔细阅读下。

https://www.ossez.com/t/php-windows-xampp-xdebug/14334

Tags: None
Last updated:2023年02月25日

Kratos

stay absorbed stay excellent

Like
< Previous
Next >

Comments

Cancel reply

Newest Hotspots Random
Newest Hotspots Random
经过小折腾,可算是把 Code Coverage API 用上了 Docker 开始清退开源组织,不付费就删除所有私镜像怎么看 IBM Semeru Windows 下的安装 JDK 17 Okhttp 的 retrofit2 运行警告信息异常 应该升级 JDK 到 17 了吗 OpenAI-J 如何进行测试
微信 API 的发送客服消息返回对象不正确OpenAI-J 如何进行测试应该升级 JDK 到 17 了吗Okhttp 的 retrofit2 运行警告信息异常IBM Semeru Windows 下的安装 JDK 17Docker 开始清退开源组织,不付费就删除所有私镜像怎么看
Spring Boot API 中文字符乱码 VSCode 插件之 - GitLens Hibernate 4 升级到 Hibernate 5 的时候 SessionFactory 不能使用 Nginx 部署的虚拟主机如何使用 Let's Encrypt 来进行加密 https Confluence 6 重构查找索引 手动升级 Confluence - 规划你的升级
Categories
  • Algorithm(算法)
  • AMQP
  • Angular
  • CI
  • Compile And CI
  • Computer Science
  • Confluence
  • DataBase
  • Gradle
  • H1B
  • Hibernate
  • IDE
  • Java
  • Jersey
  • Jira
  • MariaDB
  • PrestaShop
  • Spring
  • Spring Batch
  • U.S.
  • USRealEstate
  • USVisaTrack
  • 我的小厨

COPYRIGHT © 2020 HoneyMoose. ALL RIGHTS RESERVED.

THEME CWIKIUS.CN MADE BY VTROIS