Reputation: 11887
We are using xdebug and the tracing works as advertised during code execution via..
function someGetUsersHelper() {
xdebug_start_trace();
[SOME CODE HERE]
xdebug_stop_trace();
}
It however only traces the wrapped part of the code if the page/script is executed via loading the full page in the browser via requesting
index.php
But tracing does not work, when we call the function as an api call via
index.php?api=getUsers
Even though the very same function is executed successfully it does not trace.
As an additional note: Tracing also works if the function is called from phpunit testcases or if we set xdebug.auto_trace = 1 in the php.ini, but that leaves us with a very long, messed up trace file.
So the question is this:
Thanks a lot!!
Upvotes: 2
Views: 1479
Reputation: 1870
I could not say why the trace is not working. But you could try this:
xdebug.trace_enable_trigger=1
in your php configurationXDEBUG_TRACE
as POST/GET Parameter or as a cookieThere is also a Firefox Plugin called Easy XDebug to set the flags
Upvotes: 3