Can I manually say on xdebug profiler to start profiling in specific place?

后端 未结 2 1256
-上瘾入骨i
-上瘾入骨i 2020-12-24 01:17

I already have enabled xDebug profiling in my XAMPP installation and it works fine.

Now I like to ask if there is a way to say from within my source code when to sta

2条回答
  •  有刺的猬
    2020-12-24 01:53

    As stated by Laith, you can't choose when you want xDebug to start profiling and when you want him to stop. But, another xDebug feature offers this kind of flexibility: trace.

    Profiling and tracing are not exactly the same things but, if you end up here, it may be possible that trace may suits your need.

    To start tracing, you have to use this function: xdebug_start_trace()

    To stop tracing, you have to use this function: xdebug_stop_trace()

    There is quite a lot of settings you can use to change trace's behavior:

    http://xdebug.org/docs/execution_trace

提交回复
热议问题