【问题标题】:PHP debugging in XAMPPXAMPP 中的 PHP 调试
【发布时间】:2024-01-06 02:42:01
【问题描述】:

XAMPP/WAMP 服务器中是否默认安装了任何调试器,或者我们已经手动下载并配置了调试器?也请推荐最好的 PHP 调试器。

【问题讨论】:

  • 我没有细节,因为我已经好几个月没有做php了,但是你可以试试NetBeans,我相信它支持用XAMPP调试PHP。也很好地支持 PHPUnit :)
  • @Zoidberg,是的,NetBeans 可以使用 xdebug 进行调试,并且可以在 xampp 中配置/启用它。
  • 当你说“最好的调试器”时,你愿意付钱吗?据我所知,Xdebug 是唯一免费的替代品。
  • @jlafay 听起来这是你目前正在使用的东西,你应该回答,你肯定会得到我的支持。
  • 不,我不使用 Netbeans。

标签: php debugging xampp wamp xdebug


【解决方案1】:

如果您想使用 Netbeans 和 Xampp 进行调试,只需打开 c:\xampp\php\php.ini 并添加这些行。它对我很有用。

xdebug.remote_handler="dbgp"
xdebug.remote_enable=on
xdebug.remote_port =9000
xdebug.remote_enable = 1
xdebug.profiler_enable = off
xdebug.profiler_trigger = off
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.profiler_output_dir = "C:\xampp\tmp"

或者看看这个:看看这个:https://www.youtube.com/watch?v=HbJOP0YcSjs

【讨论】: