====== Request for Comments: Debug Trace Options ====== * Version: 1.0 * Date: 2011-11-14 * Author: Stanislav Malyshev * Status: Under Discussion * First Published at: http://wiki.php.net/rfc/debugoptions This RFC is regarding adding options to ''debug_backtrace()'' and ''debug_print_backtrace()'' ===== Introduction ===== Debug backtrace functions are a very useful debug tool. However, for big projects, the problem that often happens is that when something happens inside the code, the debug trace becomes so big it's unmanageable. This is because it always includes the arguments, and those can be complex data arrays, huge objects, etc. so when the trace is prepared or printed out, the useful information is drowned in the mass of white noise. ===== Proposal ===== Change the signature of both ''debug_backtrace()'' and ''debug_print_backtrace()'' to introduce ''options'' parameter. This parameter will be a bitmask, currently supporting these values: ^ Constant ^ Value ^ Means ^ | DEBUG_BACKTRACE_PROVIDE_OBJECT | 1 | Objects are included in trace for ''debug_backtrace()'' | | DEBUG_BACKTRACE_IGNORE_ARGS | 2 | Arguments are not included in the backtrace for both functions | The default options will be DEBUG_BACKTRACE_PROVIDE_OBJECT, which agrees with current functionality for both functions.