When Xdebug is installed/enabled, standard PHP errors (when set to display in the browser) are replaced with more informative messages that include stack traces for each. Also, I've noticed that it also seems to improve output in other areas such as the var_dump() function, formatting/color-coding the output to make it more readable.
安装/启用Xdebug时,标准PHP错误(设置为在浏览器中显示时)将被更多信息性消息替换,其中包含每个错误的堆栈跟踪。此外,我注意到它似乎也改善了其他领域的输出,例如var_dump()函数,格式化/对输出进行颜色编码以使其更具可读性。
Are there any 3rd party packages that offer similar functionality? I tend to prefer using Zend Debugger for debugging and would love to find something like this that doesn't depend on Xdebug. Certainly I could write my own error handler, a custom var_dump() function, etc., but I would love to find something that transparently integrates itself into PHP the way Xdebug's functionality does.
是否有任何提供类似功能的第三方软件包?我倾向于使用Zend Debugger进行调试,并希望找到不依赖于Xdebug的类似内容。当然,我可以编写自己的错误处理程序,自定义的var_dump()函数等,但我希望找到一些透明地将自己集成到PHP中的东西,就像Xdebug的功能一样。
Edit: I should emphasize that I'm not looking for a debugger, but for the "extras" that Xdebug offers.
编辑:我应该强调,我不是在寻找调试器,而是寻找Xdebug提供的“附加功能”。
4 个解决方案
#1
1
As for your debugging you'll only find access through PHP extensions, regardless of what IDE you are using.
至于你的调试,你只能通过PHP扩展找到访问权限,无论你使用什么IDE。
Xdebug is the most popular due to it's extra features, beyond that of what you've even described. Xdebug will do profiling (tracing) into the valgrind format that you can use programs like Kcachegrind and wincachegrind to evaluate.
Xdebug是最受欢迎的,因为它具有额外的功能,超出了你甚至描述的功能。 Xdebug将对valgrind格式进行分析(跟踪),您可以使用Kcachegrind和wincachegrind等程序进行评估。
Your only other real alternative to the debugging facilities Xdebug provides is Zend Debugger which is a part of the Zend Platform (again available as an extension).
您对Xdebug提供的调试工具的唯一其他替代方法是Zend Debugger,它是Zend平台的一部分(再次作为扩展提供)。
As for the replacements, you won't find any other extensions that do the var_dump and error reporting replacements. And especially won't find (beyond Zend Debugger) a debugging protocol, and definitely won't find any other extension that does profiling.
至于替换,您将找不到执行var_dump和错误报告替换的任何其他扩展。特别是找不到(Zend Debugger之外的)调试协议,并且肯定找不到任何其他进行性能分析的扩展。
#2
1
dBug offers quite a nice replacement for print_r:
dBug为print_r提供了相当不错的替代品:
#3
0
Try NuSphere's PHP IDE. It has an integrated debugger also, and you can get a demo version free if you like.
试试NuSphere的PHP IDE。它还有一个集成的调试器,如果你愿意,你可以免费获得一个演示版本。
#4
0
Shameless plug of my own var_dump
alternative:
我自己的var_dump替代品的无耻插件:
http://raveren.github.io/kint/
Screenshot:
#1
1
As for your debugging you'll only find access through PHP extensions, regardless of what IDE you are using.
至于你的调试,你只能通过PHP扩展找到访问权限,无论你使用什么IDE。
Xdebug is the most popular due to it's extra features, beyond that of what you've even described. Xdebug will do profiling (tracing) into the valgrind format that you can use programs like Kcachegrind and wincachegrind to evaluate.
Xdebug是最受欢迎的,因为它具有额外的功能,超出了你甚至描述的功能。 Xdebug将对valgrind格式进行分析(跟踪),您可以使用Kcachegrind和wincachegrind等程序进行评估。
Your only other real alternative to the debugging facilities Xdebug provides is Zend Debugger which is a part of the Zend Platform (again available as an extension).
您对Xdebug提供的调试工具的唯一其他替代方法是Zend Debugger,它是Zend平台的一部分(再次作为扩展提供)。
As for the replacements, you won't find any other extensions that do the var_dump and error reporting replacements. And especially won't find (beyond Zend Debugger) a debugging protocol, and definitely won't find any other extension that does profiling.
至于替换,您将找不到执行var_dump和错误报告替换的任何其他扩展。特别是找不到(Zend Debugger之外的)调试协议,并且肯定找不到任何其他进行性能分析的扩展。
#2
1
dBug offers quite a nice replacement for print_r:
dBug为print_r提供了相当不错的替代品:
#3
0
Try NuSphere's PHP IDE. It has an integrated debugger also, and you can get a demo version free if you like.
试试NuSphere的PHP IDE。它还有一个集成的调试器,如果你愿意,你可以免费获得一个演示版本。
#4
0
Shameless plug of my own var_dump
alternative:
我自己的var_dump替代品的无耻插件:
http://raveren.github.io/kint/
Screenshot: