Xdebug can provide a detailed timeline as an execution trace.
Xdebug可以提供一条详细的时间线进行执行跟踪。
Part 2 presents XDebug, a PHP extension to profile your PHP code.
第2部分介绍了XDebug,它是配置php代码的PHP扩展。
If XCache and XDebug are turbochargers, memcached is a jet engine.
如果XCache和XDebug是涡轮增压器,那么memcached就是喷气发动机。
Listing 4 shows all the relevant Settings for Xdebug for your php.ini file.
清单4显示了php . ini文件的Xdebug的所有相关设置。
As with dumps, Xdebug has several php.ini options to customize what is traced.
同转储一样,Xdebug有若干个php . ini选项用于自定义跟踪内容。
If you don't see an Xdebug section in the output of phpinfo , Xdebug failed to load.
如果您在phpinfo的输出中没有看到Xdebug部分,则Xdebug装入失败。
Xdebug should appear next to the logo if Xdebug has been properly loaded and configured.
如果正确安装并配置了Xdebug,它将显示在徽标的旁边。
Ignoring the latter, let's configure Xdebug with reasonable Settings to help debug PHP code.
忽略后者,让我们用一些合理设置来配置Xdebug以帮助调试php代码。
After the Xdebug extension is installed, you're ready to enable and configure the extension.
安装了Xdebug扩展后,就可以准备启用和配置该扩展了。
With this Xdebug configuration in place, you now have more clues to track down the perpetrator.
当此 Xdebug配置就绪后,您现在有更多的线索可以跟踪犯罪者。
Xdebug also includes a set of functions that you can add to your code to yield runtime diagnostics.
Xdebug还包括一组函数,您可以将这组函数添加到代码中以进行运行时错误诊断。
When the code moves to production, Xdebug is likely to be disabled, rendering this variable harmless.
当代码投入生产时,很可能将禁用Xdebug,呈现这个变量将不会造成什么损失。
But if you have a development system and can install Xdebug, squashing those bugs becomes a lot easier.
但是如果您有开发系统并且可以安装Xdebug,那么更正这些错误就会变得轻松得多。
If you use Xdebug with PHP V5 classes, the dump includes such attributes as public, private, and protected.
如果结合使用Xdebug与PHPv 5类,转储包括public、private和protected之类的属性。
By default, Xdebug displays fields for time, memory usage, function name, and the depth of the function call.
默认情况下,Xdebug将显示时间、内存使用量、函数名和函数调用深度字段。
When tracing is enabled, Xdebug logs each function call, including each function's arguments and return value.
当跟踪被启用后,Xdebug将记录所有函数调用,包括每个函数的参数和返回值。
Here's one more tip: Xdebug provides an enhanced var_dump function that's especially helpful with PHP arrays and classes.
下面是另外一个技巧:Xdebug提供了一个增强型var_dump函数,它对于php数组和类尤为有帮助。
Like many other PHP extensions, Xdebug builds readily, installs quickly, and configures easily — all in about 10 minutes.
和其他众多PHP扩展一样,Xdebug容易构建、安装快捷且易于配置——所有这些工作10分钟内即可完成。
Once you have Xdebug 2 installed, the following lines in your.htaccess will turn on auto profiling for all requests handled by PHP.
一旦你安装好xdebug2,下边的代码将为所以PHP接管的请求开启“autoprofiling”功能。
Armed with XDebug metrics — and not before — you can optimize your code to tweak algorithms, reduce bottlenecks, and relieve excessive memory use.
拥有了XDebug度量之后——而不是之前——您可以优化代码来调整算法、减少瓶颈并减轻过多的内存使用。
As with other PHP extensions, to verify that Xdebug is installed and available, create a bare-bones PHP program to call phpinfo and scan the results.
对于其他php扩展,要验证Xdebug是否安装并可用,可以创建一个简单的骨架php程序来调用phpinfo并查看结果。
XDebug is something akin to a software X-ray: it peers into your application, exposes its inner workings, and reveals how your code spends its cycles.
XDebug是类似于软件x光照片的内容:它将深入应用程序,揭露内部工作原理,并且揭示代码如何度过其周期。
However, because xdebug is intended for use during development and assuming that the path to xdebug.so is correct, disable other extensions and retry.
但是,由于xdebug适于在开发时使用并假定xdebug . so的路径正确,因此需要禁用其他扩展并重试。
Xdebug intervenes after 49 function calls and yields Figure 2. (By the way, the initial invocation of main to launch the program counts as the first frame.)
Xdebug将在49次函数调用后介入并得到图2(顺便说一句,main的初始调用用于启动程序计数作为第1次调用)。
The directives (in the far left column in the large table in Figure 1) are just some of the parameters you can set to alter the behavior of the Xdebug extension.
指令(图1 中大表的最左侧一列)是一些可以设定的参数,用于改变Xdebug 扩展的行为。
Installing Xdebug on your apache/PHP development server is beyond the scope of this post, but a quick ‘sudo pecl install xdebug-beta’ and a one line edit to my php.ini
在你的apache/php开发环境上安装Xdebug已经超出了我们文章的范围。
The first line loads the Xdebug extension; the second disables the profiler feature of Xdebug (just to keep things simple), and the third enables the debug features of the extension.
第一行将装入Xdebug扩展;第二行将禁用Xdebug的分析器功能(只是为了简单起见),而第三行将启用扩展的调试功能。
The first line loads the Xdebug extension; the second disables the profiler feature of Xdebug (just to keep things simple), and the third enables the debug features of the extension.
第一行将装入Xdebug扩展;第二行将禁用Xdebug的分析器功能(只是为了简单起见),而第三行将启用扩展的调试功能。
应用推荐