||Provides functions for function traces and profiling
||Derick Rethans <email@example.com> (lead) [wishlist] [details]
||The Xdebug extension helps you debugging your script by providing a lot of
valuable debug information. The debug information that Xdebug can provide
includes the following:
* stack and function traces in error messages with:
o full parameter display for user defined functions
o function name, file name and line indications
o support for member functions
* memory allocation
* protection for infinite recursions
Xdebug also provides:
* profiling information for PHP scripts
* code coverage analysis
* capabilities to debug your scripts interactively with a debug client
|+ Added new features:
- Added support for the new DBGp protocol for communicating with the debug
- A computerized trace format for easier parsing by external programs.
- The ability to set remote debugging features via the environment. This
allows an IDE to emulate CGI and still pass the configuration through to
the debugger. In CGI mode, PHP does not allow -d arguments.
- Reimplementation of the tracing code, you can now only trace to file; this greatly
enhances performance as no string representation of variables need to be
kept in memory any more.
- Re-implemented profiling support. Xdebug outputs information the same way
that cachegrind does so it is possible to use Kcachegrind as front-end.
- Xdebug emits warnings when it was not loaded as a Zend extension.
- Added showing private, protected and public to the fancy var_dump()
- Added the setting of the TCP_NODELAY socket option to stop delays in
transferring data to the remote debugger client. (Patch by Christof J. Reetz)
+ DebugClient: Added setting for port to listen on and implemented running
the previous command when pressing just enter.
+ Added new functions:
- xdebug_get_stack_depth() to return the current stack depth level.
- xdebug_get_tracefile_name() to retrieve the name of the tracefile. This
is useful in case auto trace is enabled and you want to clean the trace
- xdebug_peak_memory_usage() which returns the peak memory
used in a script. (Only works when --enable-memory-limit was enabled)
+ Added feature requests:
- FR #5: xdebug_break() function which interupts the script for the debug
- FR #30: Dump current scope information in stack traces on error.
- FR #88: Make the url parameter XDEBUG_SESSION_START optional. So it can
be disabled and the user does not need to add it.
+ Added new php.ini settings:
- xdebug.auto_trace_file: to configure a trace file to write to as addition
to the xdebug.auto_trace setting which just turns on tracing.
- xdebug.collect_includes: separates collecting
names of include files from the xdebug.collect_params setting.
- xdebug.collect_return: showing return values in traces.
- xdebug.dump_global: with which you can turn off dumping of super globals
even in you have that configured.
- xdebug.extended_info: turns off the generation of extended opcodes that
are needed for stepping and breakpoints for the remote debugger. This is
useful incase you want to profile memory usage as the generation of this
extended info increases memory usage of oparrrays by about 33%.
- xdebug.profiler_output_dir: profiler output directory.
- xdebug.profiler_enable: enable the profiler.
- xdebug.show_local_vars: turn off the showing of local variables in the
top most stack frame on errors.
- xdebug.show_mem_delta: show differences between current and previous
memory usage on a function call level.
- xdebug.trace_options: to configure extra
options for trace dumping:
o XDEBUG_TRACE_APPEND option (1)
= Changed features:
- xdebug_start_trace() now returns the filename of the tracefile (.xt is
added to the requested name).
- Changed default debugging protocol to dbgp instead of gdb.
- Changed default debugger port from 17869 to 9000.
- Changed trace file naming: xdebug.trace_output_dir is now used to
configure a directory to dump automatic traces; the trace file name now
also includes the pid (xdebug.trace_output_name=pid) or a crc32 checksum
of the current working dir (xdebug.trace_output_name=crc32) and traces
are not being appended to an existing file anymore, but simply
- Removed $this and $GLOBALS from showing variables in the local scope.
- Removed functions:
- xdebug_get_function_trace/xdebug_dump_function_trace() because of the new
idea of tracing.
= Fixed bugs:
- Fixed bug #89: var_dump shows empty strings garbled.
- Fixed bug #85: Xdebug segfaults when no idekey is set.
- Fixed bug #83: More than 32 parameters functions make xdebug crash.
- Fixed bug #75: xdebug's var_dump implementation is not binary safe.
- Fixed bug #73: komodo beta 4.3.7 crash.
- Fixed bug #72: breakpoint_get returns wrong structure.
- Fixed bug #69: Integer overflow in cachegrind summary.
- Fixed bug #67: Filenames in Xdebug break URI RFC with spaces.
- Fixed bug #64: Missing include of xdebug_compat.h.
- Fixed bug #57: Crash with overloading functions.
- Fixed bug #54: source command did not except missing -f parameter.
- Fixed bug #53: Feature get misusing the supported attribute.
- Fixed bug #51: Only start a debug session if XDEBUG_SESSION_START is
passed as GET or POST parameter, or the DBGP_COOKIE is send to the server.
Passing XDEBUG_SESSION_STOP as GET/POST parameter will end the debug
session and removes the cookie again. The cookie is also passed to the
remote handler backends; for DBGp it is added to the packet.
- Fixed bug #49: Included file's names should not be stored by address.
- Fixed bug #44: Script time-outs should be disabled when debugging.
= Fixed bug #36: GDB handler using print causes segfault with wrong syntax
- Fixed bug #33: Implemented the use of the ZEND_POST_DEACTIVATE hook. Now we
can handle destructors safely too.
- Fixed bug #32: Unusual dynamic variables cause xdebug to crash.