I am trying to get the Xdebug profiler on OS X Lion to output files like it's supposed to, but it won't. I can debug OK and code coverage also works, but I cannot get it to output the cachegrind files.
我试图让Xdebug分析器在OS X Lion上输出像它应该有的那样的文件,但它不会。我可以调试OK,代码覆盖也可以工作,但是我不能让它输出cachegrind文件。
Relevant section of my php.ini:
我的php.ini的相关部分:
zend_extension = /usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so
xdebug.remote_enable=on
xdebug.remote_host=localhost
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.profiler_enable=1
xdebug.profiler_output_dir = /var/log/xdebug
xdebug.profiler_output_name = "cachegrind.out.%t-%R"
include_path=".:/usr/lib/php/pear"
magic_quotes_gpc=off
date.timezone = 'Europe/Berlin'
extension = memcached.so
extension = http.so
memory_limit=1G
2 个解决方案
#1
3
Two things I can think off:
我可以想到两件事:
- The user under which PHP runs can't write files to /var/log/xdebug
- PHP运行的用户不能将文件写入/var/log/xdebug。
- The filename it's trying to generate (you use %R after all!) is too large for the filesystem to understand. Try using the default for
xdebug.profiler_output_name
. - 它试图生成的文件名(毕竟使用%R !)太大了,文件系统无法理解。尝试使用xdebug.profiler_output_name的默认值。
#2
1
If you are using MAMP, there is also a third way: you are modifying the wrong php.ini file.
如果您正在使用MAMP,还有第三种方法:修改错误的php。ini文件。
As i just discovered and posted here: Where does MAMP keep its php.ini?
正如我刚刚发现并发布的:MAMP在哪里保存它的php ? ini?
Hoping this can help.
希望这可以帮助。
#1
3
Two things I can think off:
我可以想到两件事:
- The user under which PHP runs can't write files to /var/log/xdebug
- PHP运行的用户不能将文件写入/var/log/xdebug。
- The filename it's trying to generate (you use %R after all!) is too large for the filesystem to understand. Try using the default for
xdebug.profiler_output_name
. - 它试图生成的文件名(毕竟使用%R !)太大了,文件系统无法理解。尝试使用xdebug.profiler_output_name的默认值。
#2
1
If you are using MAMP, there is also a third way: you are modifying the wrong php.ini file.
如果您正在使用MAMP,还有第三种方法:修改错误的php。ini文件。
As i just discovered and posted here: Where does MAMP keep its php.ini?
正如我刚刚发现并发布的:MAMP在哪里保存它的php ? ini?
Hoping this can help.
希望这可以帮助。