2017-03-28 83 views
0

如何配置XDebug以配置文件全部请求,POST,GET,Ajax,带和不带查询字符串参数?XDebug not profiling POST

当前配置(下文)仅为没有查询字符串参数的GET请求和POST请求创建配置文件(cachegrind.out)文件。

/etc/php5/apache2/conf.d/20-xdebug.ini

zend_extension = /usr/lib/php5/20121212/xdebug.so 
xdebug.profiler_enable_trigger = 1 
xdebug.profiler_enable = 0 
xdebug.profiler_append = 0 

conf.d/my.conf

<Directory "/var/www/html/sub"> 
     # Limit profiling to files in this directory 
     RewriteEngine On 
     RewriteRule (.*\.php) $1?XDEBUG_PROFILE=1 [QSA,L] 
</Directory> 

Ubuntu的14.04。 5 LTS

PHP版本5.5.9-1ubuntu4.21

XDebug的版本2.5.1

回答

0

问题的来源是,对POST请求的配置文件正在被这是一个客户端的重定向的下一请求覆盖。解决的办法是使用一个不同的分析器输出文件名

价:https://bugs.xdebug.org/view.php?id=1445

xdebug.profiler_output_name = cachegrind.out%S

许多感谢的XDebug队。