[xdebug-general] Re: how to enable xdebug profiling under certain condition?

From: Shaojie Liu <liusoaring[@]gmail.com>
Date: Tue, 13 Jan 2009 10:59:45 +0800

yup, i had read that, thanks.

so, there won't be a function like 'enable_profiling(here)', which
will make it more fexible indeed?

On Tue, Jan 13, 2009 at 2:29 AM, Derick Rethans <derick[@]xdebug.org> wrote:
> On Tue, 13 Jan 2009, Shaojie Liu wrote:
>
>> as far as i'm concered, it seems like that the only place where to
>> switch on/off the 'profiling' function is the variable of
>> debug.profiler_enable="0" in the ini file.
>>
>> while i'm thinking of how to utilize xdebug to make a live site
>> profiling, i'm stuck on the I/O performance associated with xdebug.
>> that is, if we turn on profiling on a web server, the sys load will
>> soon drive the server into mad.
>>
>> however, i indeed believe IF we can:
>> 1) only do profiling on a certain url (i.e, login.php?xxx)
>> or
>> 2) only do profiling on a certain remote_ip;
>>
>> then, we will be able to gather really really helpful data without
>> bring too much noise to server/users, and life is gorgeous.
>>
>> i read thru. the doc and mail-list with empty hand. so, how can i make
>> this happen? or any further suggestion?
>
> 1. Set the php.ini setting xdebug.profiler_enable_trigger to 1
> 2. Use either a cookie, get or post variable with the name
> "XDEBUG_PROFILE" and a random value. Then for that request there will
> be a profile file generated.
>
> This is in the docs
> at: http://xdebug.org/docs/profiler#profiler_enable_trigger
>
> regards,
> Derick
>
> --
> Like Xdebug? Send a postcard: http://derickrethans.nl/xdebug_2_released.php
> Xdebug | http://xdebug.org | xdebug-general@lists.xdebug.org
> twitter: derickrethans
>
Received on Tue Jan 13 2009 - 03:59:47 GMT

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST