Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (41 sloc) 1.9 KB
= xdebug_start_trace
Starts a new function trace
void
string trace_file [, integer options]
FUNC_FUNCTION_TRACE
TXT:
Start tracing function calls from this point to the file in the <i>trace_file</i> parameter.
If no filename is given, then the trace file will be placed in the directory as
configured by the [CFG:trace_output_dir]
setting. In case a file name is given as first parameter, the name is relative
to the current working directory. This current working directory might be
different than you expect it to be, so please use an absolute path in case you
specify a file name. Use the PHP function <a
href='http://php.net/getcwd'>getcwd()</a> to figure out what the current
working directory is.
TXT:
The name of the trace file is "{trace_file}.xt". If [CFG:auto_trace] is
enabled, then the format of the filename is "{filename}.xt" where the
"{filename}" part depends on the [CFG:trace_output_name] setting. The
<i>options</i> parameter is a bitfield; currently there are three options:
<dl>
<dt>XDEBUG_TRACE_APPEND (1)</dt>
<dd>makes the trace file open in append mode rather than
overwrite mode</dd>
<dt>XDEBUG_TRACE_COMPUTERIZED (2)</dt>
<dd>creates a trace file with
the format as described under <i>1</i> "[CFG:trace_format]".</dd>
<dt>XDEBUG_TRACE_HTML (4)</dt>
<dd>creates a trace file as an HTML table</dd>
<dt>XDEBUG_TRACE_NAKED_FILENAME (8)</dt>
<dd>Normally, Xdebug always adds ".xt" to the end of the filename that you
pass in as first argument to this function. With the
<i>XDEBUG_TRACE_NAKED_FILENAME</i> flag set, ".xt" is not added. (New in Xdebug
2.3).</dd>
</dl>
Unlike Xdebug 1,
Xdebug 2 will not store function calls in memory, but always only write to disk
to relieve the pressure on used memory. The settings [CFG:collect_includes],
[CFG:collect_params] and [CFG:collect_return] influence what information is
logged to the trace file and the setting [CFG:trace_format] influences the
format of the trace file.
Jump to Line
Something went wrong with that request. Please try again.