1

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.

Relevant section of my 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
Zsub
  • 1,799
  • 2
  • 15
  • 28

2 Answers2

3

Two things I can think off:

  1. The user under which PHP runs can't write files to /var/log/xdebug
  2. 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.
Derick
  • 35,169
  • 5
  • 76
  • 99
  • It was the second one, I never realized that of course the url (and thus the filename) could get that long :) – Zsub May 26 '12 at 14:25
1

If you are using MAMP, there is also a third way: you are modifying the wrong php.ini file.

As i just discovered and posted here: Where does MAMP keep its php.ini?

Hoping this can help.

Community
  • 1
  • 1
Aerendir
  • 6,152
  • 9
  • 55
  • 108