Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xdebug - no profile or trace output

I'm at a bit of a loss trying to get profiling and tracing working with Xdebug (debugging works fine). What's worse is that I have it working just fine on a different server/client setup, but I can't seem to see the difference that and this developer workstation using localhost. Nothing is being output to xdebug.log, either.

Server: Ubuntu 10.04, PHP 5.3.2, Xdebug 2.2.1

php.ini:

xdebug.profiler_enable=0
xdebug.profiler_enable_trigger=1
xdebug.profiler_append = 1 
xdebug.profiler_output_dir="/var/www/xdebug-profiles"
xdebug.profiler_output_name="xdebug-profile.%t.%p"

xdebug.auto_trace=0
xdebug.trace_enable_trigger=1
xdebug.trace_options = 1 
xdebug.collect_params=4
xdebug.collect_return=1
xdebug.trace_format=2
xdebug.trace_output_dir="/var/www/xdebug-traces"
xdebug.trace_output_name="trace.%t.%p"

xdebug.file_link_format="xdebug://%f@%l"
xdebug.remote_log="/var/www/xdebug.log"

The obvious answer is "permissions!" Unfortunately, I'm pretty sure that's not it:

# ls -ld /var/www/xdebug-profiles/
drwxrwxrwx 2 www-data www-data 4096 2013-01-02 10:40 /var/www/xdebug-profiles/

Using Firebug, I can see that the xdebug cookies are definitely set in the browser to trigger profiling and tracing. However, even when I disable triggered and enable global in php.ini, I still don't get any output.

Anyone have any ideas? I'm fresh out...

like image 748
Logos Avatar asked Jan 04 '13 17:01

Logos


People also ask

How do I enable Xdebug profiler?

You can also selectively enable the profiler by setting xdebug. start_with_request#trigger to trigger . You can then enable the profiler by using an environment value, a GET/POST parameter, or COOKIE variable of the name XDEBUG_TRIGGER .

What is Xdebug trace?

Xdebug allows you to log all function calls, including parameters and return values to a file in different formats. Those so-called "function traces" can be a help for when you are new to an application or when you are trying to figure out what exactly is going on when your application is running.

How do I read Xdebug logs?

The log file is configured with the xdebug. log setting. Criticals, errors, and warnings always show up in the diagnostics log that you can view by calling xdebug_info(). Criticals and errors are additionally logged through PHP's internal logging mechanism (configured with error_log in php.


1 Answers

Aha. After some playing around and seeing some odd things pop up in phpinfo(), it looks like "#" is deprecated for comments in php.ini, so the hash marks in my php.ini were blowing it up. Replaced them with semicolons, and now all is well. Bit tricky, that one...

like image 130
Logos Avatar answered Sep 18 '22 03:09

Logos