我使用webgrind,它会产生大量的缓存文件.
如何在服务器关闭或类似之后自动清除这些文件.我在windows7机器上使用WAMP安装.
这可能听起来很傻,但我不知道如何在wamp上暂时禁用webgrind.webgrind在执行脚本时是否也增加了相当大的开销?
PS:webgrind在上述语句中与xdebug互换使用.
我已经安装了Xdebug,我可以确认phpinfo()它已正确安装.我已经采取了所有提出的google"netbeans xdebug install等" 网站中给出的所有步骤.
它仍然无法在Netbeans中运行.有人可以提供任何建议吗?
这是我的php.ini调试部分......
[xdebug]
zend_extension = /usr/lib/php5/20090626/xdebug.so
xdebug.remote_enable = 1
xdebug.remote_mode = "req"
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
xdebug.idekey = "netbeans-xdebug"
Run Code Online (Sandbox Code Playgroud)
任何帮助将不胜感激!
我正在使用Eclipse IDE +远程Xdebug.EclipseIDE正在侦听9000端口以获取某种Xdebug信息.
在服务器上有一些由cron运行的php脚本.因此,每个cron执行xdebug都会向我的工作站发送信息,而EclipseIDE正试图在我的项目中找到这个文件.但无法找到文件,因为运行scrits的cron与我正在使用的项目无关.因此,每个运行Eclipse IDE的cron都会发出此消息警告http://img2.pict.com/22/fc/86/3299517/0/screenshot2b142.png
我试图添加到cron执行php脚本一些字符串...
if (function_exists('xdebug_disable')) {
xdebug_disable();
}
Run Code Online (Sandbox Code Playgroud)
......但它没有帮助.
有任何想法吗?
谢谢
我有一个奇怪的问题.我已经设置了XDebug来分析我们正在处理的PHP应用程序.我相信一切都设置正确但我运行时没有输出.我的配置如下所示:
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so
[XDebug]
xdebug.profiler_append = 1
xdebug.profiler_enable = 0 (I've tried this both on and off)
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "/debug/xdebug/profiler_output_dir"
xdebug.profiler_output_name = "cachegrind.out.%p"
Run Code Online (Sandbox Code Playgroud)
所有phpinfo()设置都应该匹配.输出目录的权限现在设置为777,所以我可以测试它.我也试过使用public_html下的目录,但没有运气.我用来启动探查器的URL是:
http://example.com/my_page.php?XDEBUG_PROFILE
-or-
http://example.com/my_page.php?XDEBUG_PROFILE=1
Run Code Online (Sandbox Code Playgroud)
两者都不起作用.任何帮助将不胜感激!!这个应用程序有5-6秒的页面加载时间,我无法通过代码跟踪它.
当我写这条消息时浏览提示似乎这是一个棘手的问题与所有类型的补丁,但没有明确的答案......无论如何,我试试我的机会,这里是.我在Ubuntu 10.04上使用Eclipse Helios PDT,使用XDebug和php.ini中的相应部分如下:
xdebug support enabled
Version 2.0.5
Supported protocols Revision
DBGp - Common DeBuGger Protocol $Revision: 1.125.2.6 $
GDB - GNU Debugger protocol $Revision: 1.87 $
PHP3 - PHP 3 Debugger protocol $Revision: 1.22 $
Directive Local Value Master Value
xdebug.auto_trace Off Off
xdebug.collect_includes On On
xdebug.collect_params 0 0
xdebug.collect_return Off Off
xdebug.collect_vars Off Off
xdebug.default_enable On On
xdebug.dump.COOKIE no value no value
xdebug.dump.ENV no value no value
xdebug.dump.FILES no value no value
xdebug.dump.GET no value no value …Run Code Online (Sandbox Code Playgroud) 我正在运行一个PHP守护进程来进行分析.
启动的php进程加载所有必需的数据,分叉自己在所有核心上分配工作负载,等待分叉的子进程完成,并收集子进程生成的结果.
由于我与其他用户共享CLI环境,因此我需要通过将php.ini值注入shell调用来启动xdebug概要分析.
$ php -d xdebug.profiler_enable=1 -d xdebug.profiler_output_dir="/home/xxx" daemon.php
Run Code Online (Sandbox Code Playgroud)
生成的cachegrind文件,如何配置父级,因此显示90%的睡眠.
有没有办法在不构建驱动程序的情况下对工作人员进行分析直接加载它们?
谢谢
当我使用PhpStorm和xdebug调试php时,我已经搜索了很多这个问题,我发现有3或4个链接讨论这个问题,但没有一个是有用的.我的Xdebug的版本是2.2.3,而PhpStorm'version是6.03.我可以逐步调试每一行,除了这一行
$this->link = mysql_connect($this->dbserver, $this->dbuser, $this->dbpass);
Run Code Online (Sandbox Code Playgroud)
PhpStorm显示此错误:等待与ide键"14841"的传入连接.这是我的xdebug配置:
zend_extension="/usr/lib/xdebug.so"
xdebug.remote_autostart=1
xdebug.show_local_vars=1
xdebug.dump.GET=*
xdebug.dump.POST=*
xdebug.dump.SERVER=*
xdebug.auto_trace=On
; default trace output directory /tmp
xdebug.collect_vars = On
xdebug.trace_output_dir=/tmp
xdebug.collect_params=4
xdebug.collect_return=On
xdebug.profiler_enable=Off
; default trace output directory /tmp
;xdebug.profiler_output_dir=/tmp
;xdebug.profiler_enable_trigger=On
;test.php?XDEBUG_PROFILE
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9001
xdebug.remote_handler="dbgp"
xdebug.remote_log = "/tmp"
xdebug.remote_connect_back=1
xdebug.idekey=PHPStorm
Run Code Online (Sandbox Code Playgroud)
我添加这些行"xdebug.remote_connect_back = 1 xdebug.idekey = PHPStorm",也抵制ide,它仍然是相同的我保证三个参数是正确的.
这似乎应该超出简单,所以我讨厌问.但我尝试配置Windows防火墙以允许XDebug在端口9000上连接到PHPStorm但没有成功.
XDebug在Vagrant Box上具有专用网络连接 - 因此主机具有虚拟网络适配器.Vagrant是192.168.33.10,主机PC是192.168.33.1.
禁用Windows防火墙后,XDebug将连接到PHPStorm.但我显然不想让我的防火墙关闭.
所以我尝试使用以下入站规则设置在Windows防火墙中打开一个端口:
但它不能让XDebug连接到PHP风暴.我也尝试将协议设置为UDP.而且我知道如果这个规则确实有效,那就太过开放了(我可以收紧范围),但目前我只是想在收紧之前看到它有效.
我正在尝试调试此代码:
public function removeBlankLines() {
$this->qp->find('br');
} // <-- break point is here
Run Code Online (Sandbox Code Playgroud)
当我深入到$ this对象(使用phpStorm)时,我看不到我感兴趣的子数组.它只显示"无法获取属性"截图:

我正在"侦听调试连接"功能.我正在从命令行运行脚本.PHP版本:
[bwood@mbp ~]$ php -v
PHP 5.4.24 (cli) (built: Jan 19 2014 21:32:15)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
Run Code Online (Sandbox Code Playgroud)
所以macOS High Sierra 10.13现在配备了PHP 7.1.配置Apache时我也/etc/php.ini从/etc/php.ini.default文件中创建了一个新的,确保在重新启动Apache后检查是否由PHP加载,但是当你运行时,macOS 10.13附带的Xdebug扩展版本似乎没有加载或显示phpinfo();
我的php.ini肯定被加载:
$ php -i | grep php.ini
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
Run Code Online (Sandbox Code Playgroud)
这是我的/etc/php.ini在配置Xdebug时的样子:
[xdebug]
zend_extension = "/usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so"
xdebug.remote_enable=on
xdebug.remote_log="/var/log/xdebug.log"
xdebug.remote_host=localhost
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
Run Code Online (Sandbox Code Playgroud)
[更新,修复了这里的拼写错误...]
但是,Xdebug不加载和检查php -i没有结果:
$php -i | grep xdebug
PHP Warning: Method xdebug_start_function_monitor() cannot be a NULL
function in Unknown on line 0
PHP Warning: xdebug: Unable to register functions, unable to load in Unknown on line 0
Segmentation fault: …Run Code Online (Sandbox Code Playgroud)